 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi,
I was wondering if there were a command for bending/curving/etc a cylinder or a
cone? Where should i look in the manual for such command? I'm currently
putting a lot of little cylinders/cones and rotate them all with a script to
give a good curving effect... but this slows the render a bit since there is
like 200 cylinders for one...
Any help will be greatly apreciated!
Simon
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <39D79DE8.C3F35E29@yahoo.com> , Simon Lemieux
<lem### [at] yahoo com> wrote:
> I was wondering if there were a command for bending/curving/etc a cylinder or
> a cone? Where should i look in the manual for such command? I'm currently
> putting a lot of little cylinders/cones and rotate them all with a script to
> give a good curving effect... but this slows the render a bit since there is
> like 200 cylinders for one...
Did you consider using torii for this? You can cut them into smaller pieces
using CSG.
Thorsten
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Did you consider using torii for this? You can cut them into smaller pieces
> using CSG.
The donut-like object? nah... It would be a bit complicated to calculate the
scales in every dimension to get the exact curve I want, cut the segment I want
and translate it where I want...
I guess this means there are no such command as "curve" or "bend" or "twist"...
I'll have to experiment with a few methods and see which is the best...
Thanks,
Simon
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sun, 01 Oct 2000 18:01:56 -0400 Simon Lemieux wrote:
>I guess this means there are no such command as "curve" or "bend" or "twist"...
>I'll have to experiment with a few methods and see which is the best...
This is correct. Try Chris Colefax's Object Bender include file, which
can be found at:
http://www.geocities.com/ccolefax/
--
Alan - ako### [at] povray org - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Simon Lemieux wrote:
>
> Hi,
> I was wondering if there were a command for bending/curving/etc a cylinder
or a
> cone?
You could try the sphere_sweep object in the unofficial version of POV-Ray
called MegaPOV. I think it should do what you need (see MegaPOV docs for more
info)
Windows version is available at http://nathan.kopp.com/patched.htm
Unix/Linux version at http://www.mailbag.com/users/mtgordon/megapov.html
--
Margus Ramst
Personal e-mail: mar### [at] peak edu ee
TAG (Team Assistance Group) e-mail: mar### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> This is correct. Try Chris Colefax's Object Bender include file, which
> can be found at:
>
> http://www.geocities.com/ccolefax/
Woa, thanks a lot!
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Simon Lemieux <lem### [at] yahoo com> wrote:
:> This is correct. Try Chris Colefax's Object Bender include file, which
:> can be found at:
:>
:> http://www.geocities.com/ccolefax/
: Woa, thanks a lot!
Don't get too excited. Since the include file uses the same technique as
you do, it will be as slow (if not even slower) than yours.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Don't get too excited. Since the include file uses the same technique as
> you do, it will be as slow (if not even slower) than yours.
Oh really? I haven't examined it yet... I was wondering, but this might go in
"povray.programation" or "povray.advanced-users", I was wondering how to
implement a new object algorithm in povray... I mean I just can't create an
object with multiple objects... that would be too much work and too slow to
render, I was looking to add my own object library to povray, such as cylindered
infinite spirals that can move, etc...
For this I could use many cylinders (many many for an almost-infinite), but I
could simply design an algorithm like for the sphere; does the ray touches the
sphere (center+radius), yes, good what color is it?... etc... Well it could be
does the ray passes through the algorithm given for the spiral, yes, good what
color is it... etc...
How could I do this?
Thanks
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 2 Oct 2000 11:02:42 -0400, Warp wrote:
>Simon Lemieux <lem### [at] yahoo com> wrote:
>:> This is correct. Try Chris Colefax's Object Bender include file, which
>:> can be found at:
>:>
>:> http://www.geocities.com/ccolefax/
>
>: Woa, thanks a lot!
>
> Don't get too excited. Since the include file uses the same technique as
>you do, it will be as slow (if not even slower) than yours.
I bet you're really happy when Christmas comes to an end;-)
--
Cheers
Steve email mailto:ste### [at] zeropps uklinux net
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
5:29pm up 3 days, 19:48, 2 users, load average: 2.12, 2.20, 2.12
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Simon Lemieux wrote:
>> Did you consider using torii for this? You can cut them into smaller
>> pieces using CSG.
>
>The donut-like object? nah... It would be a bit complicated to
>calculate the scales in every dimension to get the exact curve I want,
>cut the segment I want and translate it where I want...
>
>I guess this means there are no such command as "curve" or "bend" or
>"twist"... I'll have to experiment with a few methods and see which is
>the best...
If triangles are ok, you could have a look at the Striscia macro.
http://members.nbci.com/dvarrazzo/
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> If triangles are ok, you could have a look at the Striscia macro.
> http://members.nbci.com/dvarrazzo/
As long as the "triangles" are not visible, but only a curved cylinder, cuz if
the triangles would be visible, I would simply use a 3d modeler and bingo... but
no, I want to use povray... would the smooth triangles do it?
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
A bending transformation (which is a nonlinear transformation) is not
possible for mathematical and technical reasons (see
http://www.students.tut.fi/~warp/povVFAQ/languageVFAQ.html#bending).
You have many choices:
You can use a torus section for a bended cylinder. A bended cone is harder
(can't be done with existing primitives, at least not perfectly).
You can make isosurfaces. All those objects should be possible with them,
but it will require quite a lot of math knowledge.
You can make them with a mesh of smooth triangles. You still need some
math, but probably not as much as with isosurfaces.
This solution is not as bad is it might sound. You can use LOTS of triangles
to make the shape (so that you don't get visible straight line segments in
the silhouette of the object) without the rendering slowing down (but of
course memory usage will increase).
You can make them with bicubic patches. The result is exactly the same
as with the mesh of smooth triangles, but the advantage is that you can
more easily control the resolution of the mesh.
The disadvantage is that you need more complicated math than with the mesh
(if it can be used as a reference, I myself know enough math to make the mesh
but not the bicubic patches for bended cylinders and cones).
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I'd say make a script to generate triangle meshes, use isosurfaces (requires MegaPOV
from
nathan.kopp.com), or (for the cylinders only) a torical section; if you need math help
let
me know.
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I'd say make a script to generate triangle meshes, use isosurfaces (requires MegaPOV
from
> nathan.kopp.com), or (for the cylinders only) a torical section; if you need math
help let
> me know.
Yes this is good, I would actually make a C++ program for this, as I usually
do...
But, I forgot to say about interior... it is being discussed in
povray.advanced-user and as I know a bunch of triangles togheter won't have a
proper interior... which will be important as soon as I get a curver cylinder,
this is my next step, I forgot to mention it...
I think the best way to do it is still to put a few cylinders togheter and curve
them myself... the junction could be made with an intersection of the two
segments and the union of the two segments themselves, etc...
What do you think?
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Simon Lemieux wrote:
> I think the best way to do it is still to put a few cylinders togheter and curve
> them myself... the junction could be made with an intersection of the two
> segments and the union of the two segments themselves, etc...
You mean paste together cylinder sections? Tori section would have infinite resolution
and
render fast... and isosurfaces give you the ultimate control, you give it a function
and it
renders the implicit surface...
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> You mean paste together cylinder sections? Tori section would have infinite
resolution and
> render fast... and isosurfaces give you the ultimate control, you give it a function
and it
> renders the implicit surface...
Tori sections is a good idea, but what for a cone? There I would need cone
sections...
But I've never used/read-about isosurface before, do they have interior? Could
you send me a picture url that would describe this in a word? And is it in the
manual of povray, or, where could I get more information about isosurface?
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <39D### [at] yahoo com>, lem### [at] yahoo com wrote:
> Tori sections is a good idea, but what for a cone? There I would
> need cone sections...
To do that you would have to use isosurfaces...fortunately, the function
to do that shape would be pretty simple and fast rendering, just vary
the minor radius of a torus function with angle.
> But I've never used/read-about isosurface before, do they have interior?
They are ordinary solid objects, so they can be used as media containers
and work fine in CSG.
> Could you send me a picture url that would describe this in a word?
A picture? An isosurface can do nearly every primitive in POV-Ray, and
many other shapes.
Basically, you supply an equation that gives a value based on xyz
coordinates. The isosurface is the surface formed by all points where
your function is equal to a certain threshold value.
There are several tutorials online, but I don't have the URLs handy for
any of them right now...they would be on the links page at povray.org
though.
> And is it in the manual of povray, or, where could I get more
> information about isosurface?
They are not in the official version yet, but they are included in
MegaPOV, an unofficial version.
http://nathan.kopp.com/patched.htm
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> > And is it in the manual of povray, or, where could I get more
> > information about isosurface?
>
> They are not in the official version yet, but they are included in
> MegaPOV, an unofficial version.
> http://nathan.kopp.com/patched.htm
Oh... I see, I've heard Povray 4 will be released soon or has already been
released? Will it contain the isosurfaces? I'll check out for MegaPov...
Thanks
--
+-------------------------+----------------------------------+
| Simon Lemieux | Website : http://www.666Mhz.net |
| Email : Sin### [at] 666Mhz net | POV-Ray, OpenGL, C++ and more... |
+-------------------------+----------------------------------+
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Simon Lemieux wrote:
> Oh... I see, I've heard Povray 4 will be released soon or has already been
> released? Will it contain the isosurfaces? I'll check out for MegaPov...
POV-Ray v3.5 will be released (relatively) soon and will offer
isosurfaces. POV-Ray v4.0 is a mere twinkle in the POV-Team's
eye at this point in time.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff <chr### [at] mac com> wrote:
: An isosurface can do nearly every primitive in POV-Ray, and
: many other shapes.
Good that you said "nearly" because isosurfaces can't do _every_ primitive
in povray.
Quiz: Which primitive or primitives it can't create at all?
Which primitive or primitives it can create only partially?
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 5 Oct 2000 06:55:44 -0400, Warp wrote:
>Chris Huff <chr### [at] mac com> wrote:
>: An isosurface can do nearly every primitive in POV-Ray, and
>: many other shapes.
>
> Good that you said "nearly" because isosurfaces can't do _every_ primitive
>in povray.
>
> Quiz: Which primitive or primitives it can't create at all?
Among others, julia and mesh. (Well, mesh might be possible but it would be
ugly.)
> Which primitive or primitives it can create only partially?
planes, polys, anything infinite.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Proudly not helping RIAA and SDMI steal my rights --
http://www.eff.org/Misc/EFF/Newsletters/EFFector/HTML/effect13.08.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Simon Lemieux <lem### [at] yahoo com> wrote:
>> I'd say make a script to generate triangle meshes, use isosurfaces (requires
MegaPOV from
>> nathan.kopp.com), or (for the cylinders only) a torical section; if you need math
help let
>> me know.
> Yes this is good, I would actually make a C++ program for this, as I usually
> do...
> But, I forgot to say about interior... it is being discussed in
> povray.advanced-user and as I know a bunch of triangles togheter won't have a
> proper interior... which will be important as soon as I get a curver cylinder,
> this is my next step, I forgot to mention it...
> I think the best way to do it is still to put a few cylinders togheter and curve
> them myself... the junction could be made with an intersection of the two
> segments and the union of the two segments themselves, etc...
> What do you think?
I think a sphere sweep might be your perfect solution. Assuming you can
compute the points that the cylinder begins and ends and intermediate
points, this will give exactly the effect you want if you use one of the
splines. Even if you don't use a spline function, it should be cleaner than
using a lot of cone segments as the edges won't be visible.
Best of all, since each has a radius, it'll work for your cones too.
And finally, you won't have to do a merge to get rid of internal surfaces,
since the sweep would be a single object.
Geoff
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Geoff Wedig wrote:
> I think a sphere sweep might be your perfect solution. Assuming you can
> compute the points that the cylinder begins and ends and intermediate
> points, this will give exactly the effect you want if you use one of the
> splines. Even if you don't use a spline function, it should be cleaner than
> using a lot of cone segments as the edges won't be visible.
>
For the record, here is a croissant-making isosurface I posted in p.advanced-users
some time ago.
#declare major_axis=5;
#declare minor_axis=1;
#declare a=function{sqrt(x^2+z^2)-major_axis}
isosurface{
function{sqrt(y^2+a^2)-minor_axis*(0.9+z*0.2)}
contained_by{sphere{0,10}}
eval
threshold 0
pigment{Red}
rotate y*45
}
G.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |