Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Shapes - feature request #57

Closed
jaygrovr opened this issue Nov 13, 2018 · 39 comments
Closed

Custom Shapes - feature request #57

jaygrovr opened this issue Nov 13, 2018 · 39 comments
Assignees
Labels
enhancement Shapes Relates to new shapes.

Comments

@jaygrovr
Copy link

Is there a way to easily add some more base shapes like, a star, pentagon, rounded triangle and some other shapes? Would be cool to be able to draw something inside a space and have it repeat out those shapes like it currently does with a square or triangle.

@Mahelumi
Copy link

Mahelumi commented Nov 13, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 13, 2018

@jaygrovr, sure. My plan was to make a built in editor, but I haven't worked on it in a while.

@Mahelumi, do you want to share any of that back into the tool? I'd be happy to get co-conspirators.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 13, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 13, 2018

There are instructions in the readme. They aren't very detailed.

https://github.com/jeffeb3/sandify/blob/master/README.md

For clarification, it's not java, it's JavaScript, running in node.js. I'm not being pedantic. I just don't want you googling things with java when you should be searching for node.js.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 14, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 14, 2018

That's correct. Mahelumi suggested modifying the shapes code to make whatever shapes you want. If you have specific shapes you want, I can add them. There is already a star.

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 14, 2018

The file to edit is src/input/Transforms.js

Search for Triangle, and you'll see how I made that one. It should be simple to add more basic shapes.

There is some code floating somewhere to make arbitrary side shapes.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 14, 2018 via email

@billsey
Copy link
Contributor

billsey commented Nov 14, 2018 via email

@jaygrovr
Copy link
Author

jaygrovr commented Nov 14, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 14, 2018

Oh, so not an offset, like in the top part, but an offset as a modifier. That's a good idea!

The code for the star is in the same file (Transforms.js). IIRC, I generated the vertices first, using math, and then just insert them later.

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 14, 2018

I did some work on a variable number of sides for either a regular polygon or a multi-pointed star. Bill Sent from my Verizon, Samsung Galaxy smartphone

-------- Original message -------- From: jaygrovr notifications@github.com Date: 11/12/18 8:27 PM (GMT-08:00) To: jeffeb3/sandify sandify@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [jeffeb3/sandify] feature request (#57) Is there a way to easily add some more base shapes like, a star, pentagon, rounded triangle and some other shapes? Would be cool to be able to draw something inside a space and have it repeat out those shapes like it currently does with a square or triangle. - You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<#57>, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFnAOP09V8Wa_hnh0YokK7cMkCa7uJVCks5uukoBgaJpZM4Ya5Ig.

Yes you did! I need to finish that and merge it in. Sorry Bill.
#40

@billsey
Copy link
Contributor

billsey commented Nov 14, 2018 via email

@jeffeb3 jeffeb3 self-assigned this Nov 15, 2018
@jeffeb3 jeffeb3 changed the title feature request Custom Shapes - feature request Nov 16, 2018
@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 16, 2018

I worked on sandify a bunch today. I somehow figured out almost everything I was doing, and I was able to make some changes. I have dynamic sided polygons and dynamic pointed stars done (those are fun). Here is a list of things I think you've suggested that I haven't done. Please clarify if I missed any:

  1. Rounded corner polygons, like a rounded triangle. I am a big fan of this, I just have to come up with some good math to make a shape like that. It should be a neat little project for someone.
  2. (I'm generalizing here) Create a way to grow and spin the center of the shape, not just the vertices. In this way, the center of the shape would move away from the center of the machine, and spin around it, but the shape would remain the same size. I think this is another excellent idea. I think either a boolean button for the spin and rotate to affect the center or the points. But maybe even more interesting is another set of spin and rotate for the center, so it would support both.
  3. Custom shape designs. A point and click interface for creating your own shapes. I think this is a good idea, and I want to support a builtin text editor for some custom shapes, but I'm not too interested in getting a point and click thing going. Maybe I'll change my mind later. If someone wants to pick this up, I'd be happy to work on getting it into sandify.

@billsey
Copy link
Contributor

billsey commented Nov 16, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 16, 2018

Good idea Bill. I haven't tried it yet, but I hope the way I designed the shape options I'll be able to do that easily. If so, it will be in the next release (with the multilobed circles).

@jaygrovr
Copy link
Author

jaygrovr commented Nov 16, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 16, 2018

Tada!

screenshot-2018-11-16-1542403961

@jaygrovr
Copy link
Author

jaygrovr commented Nov 16, 2018 via email

@billsey
Copy link
Contributor

billsey commented Nov 16, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 17, 2018

It isn't posted yet. I'm in the middle of a larger update for polar machines. I am close to done. I'll post the new shapes stuff tonight or tomorrow.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 17, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 18, 2018

Posted. I don't know how to find a polar machine, except the sisyphus machines (and they aren't in my price range).

@jaygrovr
Copy link
Author

jaygrovr commented Nov 18, 2018 via email

@jaygrovr
Copy link
Author

jaygrovr commented Nov 18, 2018 via email

@Allted
Copy link
Collaborator

Allted commented Nov 18, 2018

Currently I save my file and add in_out or out_in. That way I know if the file homes (starts in the corner) or starts in the middle. Auto naming would be cool if it was easy or simple to implement.

@billsey
Copy link
Contributor

billsey commented Nov 18, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 18, 2018

I think what you're asking for would be good as a set of transforms on a path the shape would take. I think that's a good idea, but a pretty big change. I would need a good way to visualize it, and I was thinking of a dynamic chain of effects. It might end up being a ton of work though, I need to play with it.

Another idea is being able to define any equation for the parameters. So instead of a growth of 2, you could make it a growth of 2*sin(t), or something. Then you could get some neat patterns as well.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 22, 2018 via email

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 22, 2018

That looks an awful lot like #58, which I fixed (I think) today.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 22, 2018 via email

@jaygrovr
Copy link
Author

Is it possible to be able to add a spiral to a shape path.. basically take a spiral (with parameters) then plot a shape, saw a square at repeated points along the spiral path? The path wont be printed, but its the road for the shape "Stamps" to be stamped on. Does that make sense?

@jeffeb3
Copy link
Owner

jeffeb3 commented Nov 29, 2018

I thought that's what you were already asking for. I haven't started that yet.

@jaygrovr
Copy link
Author

jaygrovr commented Nov 29, 2018 via email

@billsey billsey mentioned this issue Dec 2, 2018
@jeffeb3 jeffeb3 added the Shapes Relates to new shapes. label Dec 5, 2018
@jeffeb3
Copy link
Owner

jeffeb3 commented Jan 2, 2019

I did part of the track and released it today. This doesn't have a big spiral as much as just the spin part for now. I will need to add some more buttons for things like changing the radius of the track for each loop.

@Twrecks9
Copy link

Hey Fellas,
First, You have done an AMAZING job with this software... I am stunned and in utter awe at the level this software is! I saw all the newer options for patterns and Love it even more!
Second, I got on here to make a request... A Heart... you know the cheesy one that shows up in the stores about this time every year.

just a meager request from an old guy that turned a piece of furniture into a little sand table for his wife.

Again, THANK-YOU for all the work you are doing on this project. It is truly AWESOME and Inspiring!
Sincerely
Twrecks9

@jeffeb3
Copy link
Owner

jeffeb3 commented Jan 14, 2019

Look at you getting a head start on this stuff... I will add that soon. Some members of my family have been asking for it too. :)

@jeffeb3
Copy link
Owner

jeffeb3 commented Jan 14, 2019

screenshot-2019-01-13-1547442288

Added. The thing that 99% of people won't know, and 90% of the remaining people won't appreciate is that this is a parametric equation:

        heart_points.push(Vertex(1.0 * Math.pow(Math.sin(angle), 3),
                                 13.0/16.0 * Math.cos(angle) +
                                 -5.0/16.0 * Math.cos(2.0 * angle) +
                                 -2.0/16.0 * Math.cos(3.0 * angle) +
                                 -1.0/16.0 * Math.cos(4.0 * angle)))

From:
http://mathworld.wolfram.com/HeartCurve.html

This was referenced Apr 5, 2020
@jeffeb3
Copy link
Owner

jeffeb3 commented Apr 5, 2020

I am cleaning up issues, and I read through this long thread. I think this has all been addressed, but the rounded corners and the custom shapes. I am putting those in their own issues, so they are clearer (and I can spend 2 mins remembering instead of 15).

#109
#110

@jeffeb3 jeffeb3 closed this as completed Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Shapes Relates to new shapes.
Projects
None yet
Development

No branches or pull requests

6 participants