POV-Ray : Newsgroups : povray.newusers : 3D Pattern ? : Re: 3D Pattern ? Server Time
5 Nov 2024 07:18:16 EST (-0500)
  Re: 3D Pattern ?  
From: Chris Huff
Date: 24 Apr 2000 11:25:14
Message: <chrishuff_99-293B67.10281124042000@news.povray.org>
In article <390### [at] bigfootde>, Hendrik Iben 
<Hen### [at] bigfootde> wrote:

> Hi, It might be better to give an example of what I want to do : I 
> want to visualize interference in 3d space by altering the 
> color/refraction of an object in space. Another nice pattern would be 
> the simulation of smoke and things like that. So I do not need the 
> position of the object(center) but just the position the raytracer is 
> at. I do not know if this will look  good but I would like to see 
> it... There must be some sort of interface for things like this in 
> pov-ray since the bozo pattern does a simlar thing. I can't believe 
> that theses patterns are just built in...

They *are* built in, look in the source file named "pattern.c". To do 
what you want, you might be able to combine several textures using 
layers, pigment_map, or texture_map. If you want to define your own 
pattern with an equation, you have to either add a new pattern to the 
source code and recompile, or use MegaPOV. MegaPOV allows you to define 
a function to use as the pattern:
pigment {function {noise3d(x,y,z)*sin(sqrt(sqr(x)+sqr(z))}
    color_map {...}
}
And you can #declare functions:
#declare Source = function {sin(sqrt(sqr(x)+sqr(y)+sqr(z))}

pigment {function {(Source(x,y,z)+Source(x-5,y,z)+Source(x+4,y,z-3))/3}
    color_map {...}
}

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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