jeffeb3 / sandify

web based user interface to create patterns that could be useful for robots that draw in sand with ball bearings.
MIT License
197 stars 35 forks source link

fractional loops #179

Open jeffeb3 opened 4 years ago

jeffeb3 commented 4 years ago

When we loop, we compare to an integer. It makes sense to me to consider that to be a floating point, and then figure out how much of the pattern to draw based on the fractional distance. For example, a 6 sided polygon will produce 9 points if it loops 1.5 times.

This would make some of the other features work better, I think.

bobnik commented 3 years ago

I believe that the current advanced feature "Draw portion of path" replicates this behavior. You can say loop = 5 times, and then specify: draw 50% of path, which only affects the last loop (so it loops 4.5 times). I think partial loops may be more intuitive than having to think of the portion of the last loop, and we could consider refactoring. I just wanted to flag that this functionality exists.

jeffeb3 commented 3 years ago

I agree.

It would be great if 1.1 squares would also interpolate that last line segment too.