Hilbert Curve, Koch Snowflake
 1-14  15-21

Previous
Next
 From:  bemfarmer
6441.15 In reply to 6441.14 
A quick report on Max's superior version, all times approximate:

Level 8 takes < 2 seconds. Switching curve type < 2 seconds.
Level 9 takes ~ 6 seconds. Switching curve type ~ 6 seconds.
Level 10 takes ~28 seconds. Switching curve type ~ 28 seconds. Done < 1 second.
Level 11, after some length of time, MoI seemed to time out(?), "ejected" the script,(?) or some such, and MoI will function again.

Did not observe a degradation of these times, when doing multiple switching between levels, or between curve type.

These levels have a ridiculously high number of bends.

So using calculate and objectList in the point creation recursion, (one point at a time), seems to be a poor programming practice.
Doing the calculate outside the recursion does so on all the points in one big group.

- 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:  bemfarmer
6441.16 
Here is a 3D HilbertCurve script.

It uses Max's fast htm type code.

The recursion is based upon the Thomas Diewald port of processing code. Note that he used array prototype.
http://mrdoob.github.io/three.js/examples/#webgl_lines_colors
The threejs code was removed, and MoI points and polyline/curve factory added.
The basic level 0 pattern of the 3D Hilbert shape consists of 8 points and 7 line segments, around a cube.

This is one of the 3 possible starting patterns. One cube becomes 8 sub_cubes...etc.
The maximum level is set to 4, since level 5 takes several seconds to appear.

- Brian

Fillet of corners, and sweeps are possible.

Dec2,2017, Changed comma at end of line 62 to a semicolon. Now works with MoI4beta_11_28_17.

EDITED: 2 Dec 2017 by BEMFARMER

Attachments:

  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:  Tommy (THOMASHELZLE)
6441.17 In reply to 6441.16 
Cool!

I recently created an interesting structure from your 2D Hilbert Script:
http://www.screendream.de
It's a loft between 5 different Levels...

Thank you very much for all those inspiring scripts you create!!!

Cheers,

Tom
  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
6441.18 In reply to 6441.17 
Thank you Thomas.
Your Loft is amazing. Looks like an exotic wood burl, statue, Rorschach, etc.
Does your Loft involve any other processing?

- 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:  Tommy (THOMASHELZLE)
6441.19 In reply to 6441.18 
;-)

No, it's pretty much a loft from Levels 1 > 2 > 3 > 4 > 5 > 4 > 3 > 2 > 1 with G3 filleted corners to get the round, organic shape.
It took more than an hour for MoI to build the loft and I can only save it if I set the display meshing to 180°, so that enough memory is remaining to save the mesh as obj for Thea Render.

I think we reached the limits for 32 Bit Software :-)

Cheers,

Tom
  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
6441.20 
Note, the coordinates for the Koch snowflake01 script, are not the corners of an equilateral triangle, so it is not symmetric.
(If the triangle is pointed up, a different pattern occurs.).

Using coordinates of a 3 sided MoI polygon, mirrored to point down, will yield a symmetric snowflake.
For example, (7.5, 2.0096189...) (0, 15) (15,15), where 2.0096189 is 15 minus sqrt(3)*15 / 2.
- Brian


EDITED: 25 Mar 2014 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
 From:  bemfarmer
6441.21 
Updated _HilbertCurve3D to work with MoI4betaNov28_2017, by changing comma to semicolon.
- 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

 

 
 
Show messages:  1-14  15-21