 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Robert Dawson
Subject: Re: alternate coordinate systems in iso.s.
Date: 19 Jan 2000 10:51:21
Message: <3885dd79@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Ron Parker <ron### [at] povray org> wrote in message
news:3885c3c6@news.povray.org...
> On Wed, 19 Jan 2000 11:55:15 +0100, Sigmund Kyrre Aas wrote:
> >Has anybody thought of adding spherical or toroidal coordinate systems
> >to the isosurface patch?
> >Just an idea.
>
> Spherical coordinates are already added, sort of. As far as I know there
> aren't any usable toroidal coordinate systems, because every point in
> space could be defined in two or more unique ways in such a system.
There are, thought they are odd.
x = sinh v cos phi /(cosh v -cos u)
y = sinh v sin phi /(cosh v -cos u)
z = sin u /(cosh v -cos u)
The v = const. curves are nested tori filling all of space except for a
circle and its axis of symmetry. u=const. are the spheres containing that
circle; and phi is the longitude, with phi=const. being halfplanes emanating
from the axis. The coordinate surfaces at any point are all orthogonal.
Source: Schaum's math tables.
Why anybody would want them for raytracing I don't know, but I'm sure
somebody will <grin>.
-Robert Dawson
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I was just playing around in Maple, and made some shapes there I'd like
to use in pov. f.x:
plot3d((1.2)^x * sin(y),x=-8..Pi,y=0..Pi,coords=spherical);
(snail's house)
plot3d(y,x=0..3*Pi,y=0..3*Pi,coords=toroidal,scaling=constrained);
(ufo)
I can post images in p.b.i if you are interested.
I've found several conversion functions in my "Matematische
Formelsamlung" by Rottmann, fx for torus:
x=l*cos(phi)*sinh(ksi)/(cosh(ksi)-cos(eta))
y=l*sinh(ksi)/(cosh(ksi)-cos(eta))
z=l*sin(eta)/(cosh(ksi)-cos(eta))
I'm not sure what l is, and certainly not how to do the #declare
function {thing}.
As for the built in functions, you can only pass numbers to those, not
functions. I don't see how I can use them here.
sig.
Chris Huff wrote:
>
> If I understand what you mean, these already exist in the form of the
> built in functions(like "R", "TH", "PH", and whatever you can make with
> the trig functions like atan()). And you can construct your own
> functions to do whatever you want, just declare them.
> #declare WeirdCoordinateA = function {blahblah}
> #declare WeirdCoordinateB = function {blahblah}
> #declare WeirdCoordinateC = function {blahblah}
>
> Then just use these functions as returning the coordinate values for
> your function.
>
> --
> Chris Huff
> e-mail: chr### [at] yahoo com
> Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Do you mean like being able to rotate functions? Such as: (x^8+y^8+z^8
rotate y*45)
If so, that would be too cool. Such a thing would be a huge help.
Sigmund Kyrre Aas wrote:
> Has anybody thought of adding spherical or toroidal coordinate systems
> to the isosurface patch?
> Just an idea.
>
> sig.
--
Samuel Benge
E-Mail: STB### [at] aol com
Visit the still unfinished isosurface tutorial:
http://members.aol.com/stbenge
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Philippe Debar
Subject: Re: alternate coordinate systems in iso.s.
Date: 20 Jan 2000 03:13:37
Message: <3886c3b1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Sigmund Kyrre Aas wrote:
> Has anybody thought of adding spherical or toroidal coordinate systems
> to the isosurface patch?
> Just an idea.
Funny you should mention that, I thought about suggesting that feature
almost at the same time as your post...
:-)
Philippe
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
No, I don't mean that (see post from yesterday), and I don't quite see
the urge for such a feature. Wouldn't this do the trick?:
isosurface {
function {}
rotate y*45
}
ps Just visited your isotutorial, and it looks very promising!
sig.
SamuelT. wrote:
>
> Do you mean like being able to rotate functions? Such as: (x^8+y^8+z^8
> rotate y*45)
>
> If so, that would be too cool. Such a thing would be a huge help.
>
> Sigmund Kyrre Aas wrote:
>
> > Has anybody thought of adding spherical or toroidal coordinate systems
> > to the isosurface patch?
> > Just an idea.
> >
> > sig.
>
> --
> Samuel Benge
>
> E-Mail: STB### [at] aol com
>
> Visit the still unfinished isosurface tutorial:
> http://members.aol.com/stbenge
--
Sigmund Kyrre Aas
Trondheim, Norway
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Ron Parker
Subject: Re: alternate coordinate systems in iso.s.
Date: 20 Jan 2000 08:54:52
Message: <388713ac@news.povray.org>
|
|
 |
|  |
|  |
|
 |
>No, I don't mean that (see post from yesterday), and I don't quite see
>the urge for such a feature. Wouldn't this do the trick?:
>isosurface {
> function {}
> rotate y*45
>}
Not if you plan to compose it with another function. What we need is to
let vrotate() be allowable in isosurface functions, but that'd require us
to allow vectors.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: david sharp
Subject: Re: alternate coordinate systems in iso.s.
Date: 20 Jan 2000 10:23:25
Message: <3887286d@news.povray.org>
|
|
 |
|  |
|  |
|
 |
SamuelT. <STB### [at] aol com> wrote in message
news:38868E41.19938684@aol.com...
> Do you mean like being able to rotate functions? Such as: (x^8+y^8+z^8
> rotate y*45)
>
Being able to do general coordinate transformations would be a
very nice feature, but I think would require function{} accepting
vector-valued functions as additional parameters ( and the
attendant applying of the transforms)
For simple things like rotation about y you can get by with stuff like:
#declare F=function(x^8+y^8+z^8}
#declare A=pi/4;
#declare FRotated=function{cos(A)*x+sin(A)*z, y, -sin(A)*x+cos(A)*z}
That is, applying a matrix rotation 'by hand' to the coordinates.
Of course this is not a very satisfactory solution since composing
rotations gets very ugly very quickly.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
david sharp wrote:
> Being able to do general coordinate transformations would be a
> very nice feature, but I think would require function{} accepting
I agree too that. Could be an interesting addition to matrix{}.
I'm posting images in p.b.i, since I'm not sure if you know what I'm
after.
.sig
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Philippe Debar
Subject: Re: alternate coordinate systems in iso.s.
Date: 21 Jan 2000 09:19:15
Message: <38886ae3@news.povray.org>
|
|
 |
|  |
|  |
|
 |
/*
Quick & dirty & UNTESTED cylindrical & polar coordinates function
copied from a math book,
blindly adapted for left-handed coordinate system
& thorougly UNTESTED (not even for parse errors)
(Philippe Debar phi### [at] hotmail com )
*/
// Cylindrical coordinates
#declare CylRadius=function{sqrt(x^2+z^2)}
// use y for height
// Polar coordinates
#declare PolarRadius=function{sqrt(x^2+y^2+z^2)}
#declare PolarHorizontalAngle=function{atan2(z,x)}
#declare PolarVerticalAngle=function{atan2(CylRadius(x,y,z),y)}
// I hope it'll work
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I finally tried your functions, and they worked quite fine. Trouble is I
get a frayed surface near the y-axis, so I doubt I can use this for my
snail. Increasing accuracy doesn't work either.
Thanks, anyway. Bet I can use this for something else!
sig.
//Maple command:
//plot3d((1.2)^x * sin(y),x=-8..Pi,y=0..Pi,coords=spherical);
// spherical coords by Philippe Debar phi### [at] hotmail com
#declare CylRadius=function{sqrt(x^2+z^2)}
#declare Z = function{sqrt(x^2+y^2+z^2)}
#declare X = function{atan2(z,x)}
#declare Y = function{atan2(CylRadius(x,y,z),y)}
isosurface {
function {
(1.2)^X * sin(Y)-Z
}
accuracy .01
max_trace 1
threshold 0
clipped_by {sphere {0,10}}
pigment { rgb 1 } finish { specular .5 }
rotate 0*y
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |