POV-Ray : Newsgroups : povray.binaries.images : Tangents with analytical geomtery : Re: Tangents with analytical geomtery Server Time
25 Apr 2024 19:44:02 EDT (-0400)
  Re: Tangents with analytical geomtery  
From: Bald Eagle
Date: 22 Oct 2019 17:35:00
Message: <web.5daf75ce21826f334eec112d0@news.povray.org>
Update:

OK,  So after fixed the radial pigment pattern, I worked out a bunch of little
bits to pigment the arcs and recolor the chosen arcs.  Then I worked in the
linear bezier code, the segmented bezier arc code, played with the
directionality of the segments, got an array to collect all the data, and
started to tidy up the prism definition.

The path looks mostly ok - except that somehow I'm dropping a circle and its
tangents.   :|   And since something is amiss, the prism isn't closed, and so
there's no prism.

I will have to work that out - hopefully soon. So very very close.

Anyway:
Here's how it works:

First an array of circles is declared -
x,y,z of center, and radius
two more values for when I get around to polygonal pulleys,
and then which tangents and arcs to use, along with a directional adjustment for
each.


 #declare CircleArray = array [11][10]{
  { 0.00, 0,  0.00, 0.10,   0, 0,  _Red, _Fwd, _Blk, _Fwd},
  { 1.75, 0,  2.25, 0.50,   0, 0,  _Grn, _Fwd, _Wht, _Rev},
  { 2.00, 0,  0.50, 0.15,   0, 0,  _Red, _Fwd, _Blk, _Rev},
  { 5.50, 0,  3.00, 0.25,   0, 0,  _Grn, _Fwd, _Wht, _Rev},
  { 2.50, 0, -1.00, 1.00,   0, 0,  _Red, _Fwd, _Blk, _Fwd},
  { 1.00, 0, -2.00, 0.25,   0, 0,  _Grn, _Fwd, _Wht, _Fwd},
  { 0.50, 0, -1.00, 0.25,   0, 0,  _All, _Fwd, _All, _Fwd},
  {-1.00, 0, -1.50, 0.50,   0, 0,  _All, _Fwd, _All, _Fwd},
  {-3.00, 0,  0.00, 0.50,   0, 0,  _All, _Fwd, _All, _Rev},
  {-2.50, 0,  2.00, 0.10,   0, 0,  _All, _Fwd, _All, _Rev},
  {-1.25, 0, -0.25, 0.20,   0, 0,  _All, _Fwd, _All, _Fwd},
  //{-1.00, 0,  3.00, 0.30,   0, 0,  _Blu, _Fwd, _Blk, _Fwd},
  }


The circles and all of the tangents get drawn out, and then you use that first
render to choose the path.  Once a circle has two tangents chosen, there are now
endpoints for 2 arcs, and those arcs get colored.  Pick which arc you want, and
you get a continuous path, colored green-to-red start -to-finish.

Then a loop cranks through the circle array and assigns Bezier spline segments
to everything and writes that into an array.

Then a loop inside a prism declaration unwraps all of those points for the
prism.


In the attached image, circles 0-5 all have the tangent and arc paths selected.
circle 6 has both tangents selected, but the arc path still isn't defined.
7, 8, and 9 are all in the initial stage.

And now to do more debugging.   :(


Post a reply to this message


Attachments:
Download 'serpentinebeltprism.png' (531 KB)

Preview of image 'serpentinebeltprism.png'
serpentinebeltprism.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.