 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi,
I went searching for a macro to round out the corners of linear
sphere_sweeps, but was not successful. So I made my own :) It's easy to
use: you just provide the spline points (and optionally the arc radii)
for each point. It automatically joins the first and last points if they
are the same. Since the object is made out of cylinders, tori and discs,
the render time is pretty good.
The include file and an example scene are available over at p.t.scene-files:
http://news.povray.org/povray.text.scene-files/thread/%3C4c3d20db%40news.povray.org%3E/
Happy Ray Tracing!
Sam
Post a reply to this message
Attachments:
Download 'rounded_lsweep_render.jpg' (114 KB)
Preview of image 'rounded_lsweep_render.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
You did it again, Sam! Congratulations and thank you indeed!
Something for the Object Collection, no doubt.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> You did it again, Sam! Congratulations and thank you indeed!
>
> Something for the Object Collection, no doubt.
Cool! Thanks for looking beyond the horribly sterile image :) The macro
does not perform any bounds checking to properly fit the arcs to the
segments. Doing so would have been too complex. The current behavior
actually gives you more control, I think.
Can you think of a better name than "rounded_lsweep"? I tried to choose
a name that would conform to the Object Collection's naming convention,
just in case I decided to post it there.
I can already think of a couple more useful macros based on this
technique. Hopefully I can make progress on at least one of them, to
finish a modeling project.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
stbenge wrote:
> Thomas de Groot wrote:
>> You did it again, Sam! Congratulations and thank you indeed!
>>
>> Something for the Object Collection, no doubt.
>
> The macro does not perform any bounds checking to properly fit the arcs to the
> segments.
To clarify, the arc segments *do* conform to the angles as they should.
But if they are too large they will extend past the arcs from another
corner, so the arc radius will not automatically adjust itself to keep
this from happening... which amounts to you having to give the offending
corner a smaller arc radius. I hope that makes sense. As usual I didn't
express myself properly :(
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"stbenge" <myu### [at] hotmail com> schreef in bericht
news:4c3dd9af$1@news.povray.org...
> Cool! Thanks for looking beyond the horribly sterile image :) The macro
> does not perform any bounds checking to properly fit the arcs to the
> segments. Doing so would have been too complex. The current behavior
> actually gives you more control, I think.
It looks very reasonable to me indeed and useful for most cases I am sure.
Purists might want something more sophisticated, but generalist like me are
very happy with it!
>
> Can you think of a better name than "rounded_lsweep"? I tried to choose a
> name that would conform to the Object Collection's naming convention, just
> in case I decided to post it there.
This seems acceptable to me, simple and descriptive. I cannot come up with
something better...
>
> I can already think of a couple more useful macros based on this
> technique. Hopefully I can make progress on at least one of them, to
> finish a modeling project.
Waiting impatiently for further contributions ;-)
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"stbenge" <myu### [at] hotmail com> schreef in bericht
news:4c3ddd79@news.povray.org...
> To clarify, the arc segments *do* conform to the angles as they should.
> But if they are too large they will extend past the arcs from another
> corner, so the arc radius will not automatically adjust itself to keep
> this from happening... which amounts to you having to give the offending
> corner a smaller arc radius. I hope that makes sense. As usual I didn't
> express myself properly :(
Clear enough for me, Sam. Good to keep in mind. I see that you have put this
in your caveats.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> "stbenge" <myu### [at] hotmail com> schreef in bericht
> news:4c3dd9af$1@news.povray.org...
>> Cool! Thanks for looking beyond the horribly sterile image :) The macro
>> does not perform any bounds checking to properly fit the arcs to the
>> segments. Doing so would have been too complex. The current behavior
>> actually gives you more control, I think.
>
> It looks very reasonable to me indeed and useful for most cases I am sure.
> Purists might want something more sophisticated, but generalist like me are
> very happy with it!
Glad to hear it. The purists can be such snobs sometimes ;)
>> I can already think of a couple more useful macros based on this
>> technique. Hopefully I can make progress on at least one of them, to
>> finish a modeling project.
>
> Waiting impatiently for further contributions ;-)
It all depends on how stuck I get. I found myself stumped for hours
yesterday on a single problem. I finally found the solution by analyzing
the problem carefully, but now I need the implementation... I ended up
learning the basics of Coordinate Geometry to figure out the problem,
since I was never taught higher math in school... I can make a line and
find the y-intercept, but now I need to find it for three dimensions. If
I take it a step at a time, the pieces should fall into place like they
did for rounded_lsweep.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Christian Froeschlin
Subject: Re: rounded_lsweep, an object macro
Date: 15 Jul 2010 19:57:44
Message: <4c3fa078@news.povray.org>
|
|
 |
|  |
|  |
|
 |
stbenge wrote:
> I can make a line and find the y-intercept, but now I need to find it
> for three dimensions.
If you have a problem just ask in the newsgroups and I'm sure
people will be queueing up for the honor of answering ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Christian Froeschlin wrote:
> stbenge wrote:
>
>> I can make a line and find the y-intercept, but now I need to find it
>> for three dimensions.
>
> If you have a problem just ask in the newsgroups and I'm sure
> people will be queueing up for the honor of answering ;)
I know, I know. And it's appreciated! Usually I try to figure these
things out for myself, asking questions only when I'm stuck. Which I'm
not this time, because right when I decided to start hammering out a
method for 3D line/plane intersection, a thought occurred to me: Luke,
use the trace(). So now I'm unstuck :D
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
stbenge wrote:
> method for 3D line/plane intersection,
I thought a cheat-sheet kind of thing for this sort of basic geometric
equations would be handy. A book that goes into the basics of the geometric
math in a way that's easy to look things up, for (say) inside/outside calcs,
intersections of various simple shapes, calculating angles in various
situations, and so on.
--
Darren New, San Diego CA, USA (PST)
C# - a language whose greatest drawback
is that its best implementation comes
from a company that doesn't hate Microsoft.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> stbenge wrote:
>> method for 3D line/plane intersection,
>
> I thought a cheat-sheet kind of thing for this sort of basic geometric
> equations would be handy. A book that goes into the basics of the
> geometric math in a way that's easy to look things up, for (say)
> inside/outside calcs, intersections of various simple shapes,
> calculating angles in various situations, and so on.
That would be nice. I'm making sure to chronicle certain discoveries for
future reference. This last problem involved placing an arc of the right
radius and angle into an Isosceles triangle so that both the end points
of the arc and points B and C of the triangle would meet. Simple math
wasn't cutting it, and I ended up sketching out a diagram to find a way
to arrive at the correct solution.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"stbenge" <myu### [at] hotmail com> schreef in bericht
news:4c3ff1fb@news.povray.org...
> Darren New wrote:
>> stbenge wrote:
>>> method for 3D line/plane intersection,
>>
>> I thought a cheat-sheet kind of thing for this sort of basic geometric
>> equations would be handy. A book that goes into the basics of the
>> geometric math in a way that's easy to look things up, for (say)
>> inside/outside calcs, intersections of various simple shapes, calculating
>> angles in various situations, and so on.
>
> That would be nice. I'm making sure to chronicle certain discoveries for
> future reference. This last problem involved placing an arc of the right
> radius and angle into an Isosceles triangle so that both the end points of
> the arc and points B and C of the triangle would meet. Simple math wasn't
> cutting it, and I ended up sketching out a diagram to find a way to arrive
> at the correct solution.
>
Not sure if this will help you, but have you tried Friedrich Lohmueller's
insert menu add-ons? You can find them (with other goodies) at:
http://www.f-lohmueller.de/pov_tut/pov__eng.htm
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> "stbenge" <myu### [at] hotmail com> schreef in bericht
> news:4c3ff1fb@news.povray.org...
>> Darren New wrote:
>>> stbenge wrote:
>>>> method for 3D line/plane intersection,
>>> I thought a cheat-sheet kind of thing for this sort of basic geometric
>>> equations would be handy. A book that goes into the basics of the
>>> geometric math in a way that's easy to look things up, for (say)
>>> inside/outside calcs, intersections of various simple shapes, calculating
>>> angles in various situations, and so on.
>> That would be nice. I'm making sure to chronicle certain discoveries for
>> future reference. This last problem involved placing an arc of the right
>> radius and angle into an Isosceles triangle so that both the end points of
>> the arc and points B and C of the triangle would meet. Simple math wasn't
>> cutting it, and I ended up sketching out a diagram to find a way to arrive
>> at the correct solution.
>>
>
> Not sure if this will help you, but have you tried Friedrich Lohmueller's
> insert menu add-ons? You can find them (with other goodies) at:
> http://www.f-lohmueller.de/pov_tut/pov__eng.htm
He's got an analytical geometry section, which is what I'm into now.
Thanks for showing me this :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"stbenge" <myu### [at] hotmail com> schreef in bericht
news:4c40935f$1@news.povray.org...
> He's got an analytical geometry section, which is what I'm into now.
> Thanks for showing me this :)
Glad to be of help. :-)
It was precisely the Analytical Geometry that prompted me to ask.
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Shay
Subject: Re: rounded_lsweep, an object macro
Date: 5 Aug 2010 10:07:46
Message: <4C5AC653.3000807@n.n>
|
|
 |
|  |
|  |
|
 |
On 07/14/2010 10:37 AM, stbenge wrote:
>
> Can you think of a better name than "rounded_lsweep"?
BITD, I called mine, which worked a bit differently than yours,
"cheap_sweep."
Ron Parker had another, which worked differently that either of ours,
called TorSpline. Don't know if Tor is an acronym for some mathematical
concept or a reference to Tor Olav, who's a bit of a "mathematical
concept" himself.
-Shay
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Am 05.08.2010 16:10, schrieb Shay:
> Ron Parker had another, which worked differently that either of ours,
> called TorSpline. Don't know if Tor is an acronym for some mathematical
> concept or a reference to Tor Olav, who's a bit of a "mathematical
> concept" himself.
Short for torus/toroidal, I'd guess.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Shay" <n@n.n> schreef in bericht news:4C5AC653.3000807@n.n...
> Ron Parker had another, which worked differently that either of ours,
> called TorSpline. Don't know if Tor is an acronym for some mathematical
> concept or a reference to Tor Olav, who's a bit of a "mathematical
> concept" himself.
"This macro is used to create a smooth spline of toruses connecting
a sequence of points."
// Date: 7/17/1998
// Auth: Ronald L. Parker
Thomas
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Shay wrote:
> On 07/14/2010 10:37 AM, stbenge wrote:
>>
>> Can you think of a better name than "rounded_lsweep"?
>
> BITD, I called mine, which worked a bit differently than yours,
> "cheap_sweep."
>
> Ron Parker had another, which worked differently that either of ours,
> called TorSpline.
My googling skills must be slipping... I could find neither of those
before making my own :(
> Don't know if Tor is an acronym for some mathematical
> concept or a reference to Tor Olav, who's a bit of a "mathematical
> concept" himself.
>
> -Shay
lol
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Thomas de Groot wrote:
> "Shay" <n@n.n> schreef in bericht news:4C5AC653.3000807@n.n...
>> Ron Parker had another, which worked differently that either of ours,
>> called TorSpline. Don't know if Tor is an acronym for some mathematical
>> concept or a reference to Tor Olav, who's a bit of a "mathematical
>> concept" himself.
>
> "This macro is used to create a smooth spline of toruses connecting
> a sequence of points."
> // Date: 7/17/1998
> // Auth: Ronald L. Parker
Hmm, I'll try to find that.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 08/06/2010 02:39 AM, clipka wrote:
> Am 05.08.2010 16:10, schrieb Shay:
>
>> Ron Parker had another, which worked differently that either of ours,
>> called TorSpline. Don't know if Tor is an acronym for some mathematical
>> concept or a reference to Tor Olav, who's a bit of a "mathematical
>> concept" himself.
>
> Short for torus/toroidal, I'd guess.
doh! I guess 8 years wasn't long enough for me to figure that one out
for myself. :)
-Shay
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 08/06/2010 12:43 PM, stbenge wrote:
> Shay wrote:
>> On 07/14/2010 10:37 AM, stbenge wrote:
>>>
>>> Can you think of a better name than "rounded_lsweep"?
>>
>> BITD, I called mine, which worked a bit differently than yours,
>> "cheap_sweep."
>>
>> Ron Parker had another, which worked differently that either of ours,
>> called TorSpline.
>
> My googling skills must be slipping... I could find neither of those
> before making my own :(
>
Neither does exactly what yours does, so you certainly didn't waste your
time.
A lot of the old POV ng stuff doesn't seem to be available online. Tried
to copy and paste the old macros into this message, but ended up with a
mess.
Ron Parker's is included in Hugo's response to my post:
"Cheap Sweep" Mar 27 2002 p.b.images
Mine is:
"Cheap_Sweep.inc" Apr 04 2002 p.b.scene-files
-Shay
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |