Gosper curve

Next
 From:  bemfarmer
8176.1 
The Gosper curve is a recursive, space filling, fractal curve.

https://spacefillingcurves.wordpress.com/
https://kilin.clas.kitasato-u.ac.jp/museum/gosperex/343-024.pdf

Orders 0 through 3 were generated manually with MoI, fairly easily using rotations and scales and copies and more rotations.
A script is being attempted, which would allow for rounded edges.

EDIT: The command Orient, Line/Line performs the copy align and scale function desired!

It is necessary to deal with directed line segments, "arrows," not just a polyline. I was thinking of using something like:
genseg0.head, genseg0.tail? Or something like part of a half edge data structure?

Red is the "Initiator" arrow line segment, which is order 0.
Blue is the Generator curve, of order 1, with 7 arrow line segments.
Radiant Orchid is the order 2 curve, with arrow heads deleted, and has 7*7 = 49 segments.
Emerald is the order 3 curve, with arrow heads deleted, and has 7*7*7 = 343 segments.
White is the triangle lattice.

- Brian
There are also other Generalized Gosper curves.
I'd like to router the pattern on a slab of wood...

EDITED: 13 Nov 2016 by BEMFARMER


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8176.2 In reply to 8176.1 
How about polyarrow as a name for a polyline with directed line segments?
Or polyvector.

- Brian

So a directed line segment is a "vector," more or less.

EDITED: 13 Nov 2016 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8176.3 
Updated markdown document.
Understanding of poly line segments improved.
MoI lines have start and end points already!
Orient line/line command will likely be perfect for the script...
The Orient line/line command can do copy, scale, and align.
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  futagoza (STEFAN)
8176.4 
Hi Brian,

interesting read. I attach for you a Peano Gosper Curve with more iterations. Maybe you find it useful. It is done with Shade3D vers. 12 and a preset from Mr Toshiaki Katoh's Math Modeler, which you would probably love... (unfortunately OS X only).

If you want to take a look what his Math plug-in's for Shade3D can do:

http://www.ne.jp/asahi/t/katoh/

it is under the Scripts section and the first link is for the videos.

Best Regards
Stefan

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
8176.5 In reply to 8176.4 
Than you Stefan
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  bemfarmer
8176.6 In reply to 8176.1 
This gosper curve script uses OrientLineToLine, rather than turtle graphics or L-Systems.
One gosper curve polyline is created, for the current Level.
The maximum level is 5, which takes about 2 seconds. Modifying the code would permit level 6, which takes about 12 seconds.
Level 7, which consists of 823543 line segments, failed to process. Maybe MoI version 4 would process it?

After the script is done, the polyline can be converted to a control point curve, with the script _PolyCurveToCurveBeta.

The script demonstrates scripting.

Documentation may be re-written.

- Brian



  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All