Forum > Graphics

Sutcliffe Fractal: Found a nice animated JavaScript version

(1/2) > >>

Boleeman:
Finally completed the Sutcliffe Pentagon by TRon.

The Naming "Sutcliffe Pentagons" is a bit deceptive as it produces the fractal for different polygon types.

I put in another image to demonstrate nesting.

Actually TRon put a Paying it Forward messaage in the converted source so I will assume it's OK to share.

So here it is:

What I noticed is:
1.  When you change the TSpinedit for number of sides from 7 to 6 it is unresponsive, but going up to 8 sides and then back to 6 brings up the correct image.
2. Increasing the SubStructTarget values bring up exact images from previous values.
3. TRon mentions the root branch as possibly not being necessary but I do not get an image if it is not there.
 // render root branch
  CreateBranch(0, 0, Points, aNest, aStrutTarget, aSubStrutTarget, aStrutFactor);
  // ??? is the following call really necessary ???
  //  DrawBranch(Points, aNest);   
4. I used   centerY := (Self.Height - 77) div 2;  to center the image. The 77 is the height of Panel1.
    (was a bit lost on how to instead use Panel1.height in the other unit and ended up just using the value 77)

Curt Carpenter:
Interesting.  I was not familiar with the object, but found an interesting discussion of its origins here: 
https://www.codeproject.com/Articles/214536/Generative-Art-Case-Study-Sutcliffe-Pentagons

Boleeman:
Curt, I had originally learnt about it at Codeproject as well and then I found a great Javascript version of it which TRon had graciously converted for this forum.

The code is based on https://github.com/tex2e/p5js-pentagon

In the Lazarus version I would like to have added opacity, perhaps using BGRAbmp.

TRon:

--- Quote from: Boleeman on February 04, 2024, 02:13:18 am ---Actually TRon put a Paying it Forward messaage in the converted source so I will assume it's OK to share.

--- End quote ---
If that was a question (indirectly  ;D ) directed to me then the answer is yes it is ok to share. That is exactly what PIF means:  use, abuse and share what you've learned/created so that others can (also) learn from it  :)


--- Quote ---3. TRon mentions the root branch as possibly not being necessary but I do not get an image if it is not there.

--- End quote ---
Hmz, I would have to take a closer look at your current example then (bit busy atm so will do that later) because in my tests I did indeed not notice the difference. But also note that I have not the faintest idea about sutcliffe diagrams and their mathematical peculiarities (let alone know anything about the implementation that was offered at the javascript repo.. as it was (almost) a literal translation).

Boleeman:
Initially was unsure of the sharing status, so thanks for confirming (did not want to overstep the mark).

Still amazed at your conversion skills.
I have been practicing conversions with the Pentaflakes and Curling Pythagoras Tree programs from JavaScript.

With CSharp conversions and Python conversions, there must be a difference in World transform coordinates, as only some bits are working. Need to study up a bit more and work out why?

Thanks TRon for all your help.

Navigation

[0] Message Index

[#] Next page

Go to full version