POV-Ray : Newsgroups : povray.unofficial.patches : alternate coordinate systems in iso.s. Server Time
2 Sep 2024 16:15:29 EDT (-0400)
  alternate coordinate systems in iso.s. (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
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] aolcom> 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

From: Sigmund Kyrre Aas
Subject: Re: alternate coordinate systems in iso.s.
Date: 20 Jan 2000 11:03:07
Message: <38873194.A6E1AB5A@stud.ntnu.no>
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] hotmailcom )

*/

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

From: Sigmund Kyrre Aas
Subject: Re: alternate coordinate systems in iso.s.
Date: 24 Jan 2000 16:19:49
Message: <388CC119.E458B555@stud.ntnu.no>
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] hotmailcom
#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

<<< Previous 10 Messages Goto Initial 10 Messages

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