POV-Ray : Newsgroups : povray.advanced-users : Seeking complex prism advice : Re: Seeking complex prism advice Server Time
18 Apr 2024 22:01:06 EDT (-0400)
  Re: Seeking complex prism advice  
From: Leroy
Date: 9 Oct 2019 14:45:00
Message: <web.5d9e2a1039eb184f6ae59d90@news.povray.org>
I thought that prisms were no longer used.
 Everyone has gone mesh triangles crazy.
Then someone asked about round prisms and I had to drop everything and do the
POV code. I had wrote a c++ windows program a long time ago to make Prisms and
polygons that I update it but never published. So for the last few days I've
been going though the code to see if I could add rounding to it.
 Now you can along and I think maybe prism aren't dead. Now to the question:
 William F Pokorny was right bezier prisms does it all you can linear parts and
curved parts in one prism.

> So what I was envisioning was a prism object where you could do something like:
>
> #declare DrawnComplexPrism =
> prism {
> linear
>      <vector[s]>,
> cubic
>      <vector[s]>,
> linear
>      <vector[s]>,
> circular // would be nice to have a way to do this, to get true circular arcs
>      <vector[s]>,
> linear
>      <vector[s]>
> }
>
 I can see in your the code above that we could cut it into several bezier
prisms union together. Each with its on variables. But if we wanted to make one
solid object then the borders between bezier object would have to match.
 The big question is for the non linear prisms, do you want the code to make
point vectors or just make control vectors.


>
> I have a few more parts to model, and I'll probably use some other methods to
> hammer them out so that I have the code examples, but I just wanted to clarify
> the idea.
>
> Clearly there would issues with determining where the segments intersected,
> since the list of vectors wouldn't necessarily explicitly define those.
> POV-Ray solves for roots, perhaps future [experimental] versions could have
> intersection solvers.
>
> For instance, let's draw a right triangle, with a circle centered at the vertex
> of the 90 degree angle.  The perpendicular lines would represent - not absolute
> line segments - but rays pointing toward the circular locus the user intends to
> intersect.
>
> The prism would then look like a triangle with a semi-circular bulge at one
> corner.
>
> I'm not sure what sorts of pathological cases might arise, but perhaps they can
> be handled with error messages, allowing detached prism subsegments to coexist
> (imagine if the circle and triangle did NOT overlap), and making use of of the
> 'inverse' keyword to switch between a default choice of one possible option vs
> the remaining option (picture a circle overlapping TWO vertices of a narrow
> triangle....
>
> Again, just brainstorming and illustrating the idea for rapid construction of an
> "extruded" type shape.

 I'm lazy for Fast prisms I still use my old prism/polygon program. Even with
the upgrade it is small fast and does a lot. The one thing it is weak on is
accurate placement of points. It needs a total rewrite.
Its here:: http://leroyw.byethost15.com/
Have Fun!


Post a reply to this message

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