Recent

Author Topic: Nautilus Spiral: A bit complicated  (Read 159 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 887
Nautilus Spiral: A bit complicated
« on: April 15, 2025, 08:15:37 am »
I made a Nautilus Spiral in Lazarus

Used a bgrabmp for the rendering.


Not sure exactly why but there is a part in the code I had to "trial and error" to get the expected curve.

Code: Pascal  [Select][+][-]
  1.     if (i <= 12) or ((i >= 29) and (i <= 44)) then
  2.       perp := PointF(perp.X, perp.Y);
  3.  
  4.     arcCenter := PointF(
  5.       midPt.X + perp.X * hh,
  6.       midPt.Y + perp.Y * hh
  7.     );


Would be nice to make a 3D version, but not really sure how to go about it.
Found a JavaScript 3D version that looks good.

Enjoy.
« Last Edit: April 15, 2025, 08:25:54 am by Boleeman »

 

TinyPortal © 2005-2018