|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi All
I want to shear an isosurface, before anyone says it, I know about the
shearing macro in transforms.inc but I need to shear an isosurace by using
some sort of function before blobbing the isosurface - does this make sense?
if does is it possible and how do I do it?
Mick
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <40aa5b1d@news.povray.org> , "Mick Hazelgrove"
<mic### [at] mhazelgrovefsnetcouk> wrote:
> I want to shear an isosurface, before anyone says it, I know about the
> shearing macro in transforms.inc but I need to shear an isosurace by using
> some sort of function before blobbing the isosurface - does this make sense?
>
> if does is it possible and how do I do it?
How about a transform function? See section 6.1.6.4 "Declaring User-Defined
Vector Functions" <http://www.povray.org/documentation/view/140/>. It won't
be fast, but I am not sure there are faster ways to do what you want.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <40aa5d30@news.povray.org> , "Thorsten Froehlich"
<tho### [at] trfde> wrote:
You should be able to code it like this:
#declare tfoo = function { transform { matrix { ... } } }
#declare afoo = function { ... your function ... }
#declare foo = function { afoo(tfoo(x,y,z).x,tfoo(x,y,z).y,tfoo(x,y,z).z) }
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks Thorsten
Speed doesn't matter as I'll convert the isosurface to a mesh when I get it
right.
Mick
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mick Hazelgrove wrote:
> Hi All
>
> I want to shear an isosurface, before anyone says it, I know about the
> shearing macro in transforms.inc but I need to shear an isosurace by using
> some sort of function before blobbing the isosurface - does this make sense?
>
> if does is it possible and how do I do it?
You can very easily apply transforms to functions with the IsoCSG lib:
http://www.tu-bs.de/~y0013390/pov/ic/
But note that when you have a function representing linear distance from
a surface (which is usually what you want for blobbing) and you shear it
(or scale it non-uniformly) you will loose this property of the function.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 01 May. 2004 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I need to shear an isosurace by using
> some sort of function before blobbing the isosurface
To shear a function along an axis, just replace one of the axis variables
(y, for instance), with the same variable offset by a different variable
(y+C*x). For example, take the unit sphere function:
x*x + y*y + z*z - 1
By replacing y with y+2*x, we can bring the right side of the sphere down
and the left side up:
x*x + (y+2*x)*(y+2*x) + z*z - 1
Try rendering it and see the results.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime <fak### [at] emailaddress> wrote:
> x*x + y*y + z*z - 1
> By replacing y with y+2*x, we can bring the right side of the sphere down
> and the left side up:
> x*x + (y+2*x)*(y+2*x) + z*z - 1
This is easier to do like this:
#declare SphereF = function { x*x + y*y + z*z -1 }
#declare Sheared = function { SphereF(x, y+2*x, z) }
--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in news:40aa5b1d@news.povray.org Mick Hazelgrove wrote:
> if does is it possible and how do I do it?
>
Just found this in the docs:
6.5.4.3.4 Functions, Shear
shear in XY-plane : replace "x" with "x + y*tan(radians(Angle))" (idem
other parameters)
shear 45 degrees left gives P(x+y*tan(radians(45)), y, z)
Ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks Guys
that gives me lots to play with :-)
Mick
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |