 |
 |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |