POV-Ray : Newsgroups : povray.general : detemine diameter of bezier_spline lathe object? : Re: detemine diameter of bezier_spline lathe object? Server Time
29 Jul 2024 06:17:25 EDT (-0400)
  Re: detemine diameter of bezier_spline lathe object?  
From: joe
Date: 4 Sep 2012 20:50:01
Message: <web.5046a0c82e2836bdad797add0@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> You can use the trace function. The lathe object is created around the Y
> axis.
> Create it in a #declare statement and DON'T translate it in any way.
> Call the trace from some point situated outside it's bounding box, along
> an axis with the direction vector pointing toward the Y axis:
> #declare Normal=<0,0,0>;
> #declare Loc= trace(Your_Lathe, <50,Elevation,0>, -x, Normal);
>
> Elevation is used to travel up/down the lathe.
> Normal is used to check if you effectively encopunter the object. If
> it's lenght is zero, it means that you missed your object.
> Loc will contain the radius in it's X component and you can isolate it
> like this:
> #declare Radius=Loc.x;
>
> You can also trace from <0,Elevation,0> to start from the Y axis to find
> an inward facing location.
>
> This should work in most cases. If you have a rather complexe shape, you
> may need to shoot your tracint ray at an angle up od down to find a
> point that would otherwise be masked by some surface.
>
> Alain

Thank you very much!!


Post a reply to this message

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