|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to use POV-Ray to plot some mathematical 3d functions, and I can make
a simple plot of the function, but I don't know how to make it look beautiful.
For example, I'm trying to plot this function
y=Sin(x)*Cos(z)
using this code:
isosurface {
function { sin(x)*sin(z)-y }
accuracy 0.001
contained_by{box{-2*pi,2*pi}} open
max_gradient 5
pigment {rgb .9}
}
camera {
location <10,10,10>
look_at <0.0, 0.0, 0.0>
}
light_source { <50,50,50> 1 }
background { rgb <0,.25,.5> }
and I can get a result look like this
http://imgur.com/jxElYiI
but how can we make it look like this
http://www.mitchr.me/SS/mjrcalc/lispy/exPovWaveGraph-ART_p.png
Any suggestions and comments are appreciated.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"xslittlegrass" <nomail@nomail> wrote:
> I'm trying to use POV-Ray to plot some mathematical 3d functions, and I can make
> a simple plot of the function, but I don't know how to make it look beautiful.
>
> For example, I'm trying to plot this function
>
> y=Sin(x)*Cos(z)
>
> using this code:
>
> isosurface {
> function { sin(x)*sin(z)-y }
> accuracy 0.001
> contained_by{box{-2*pi,2*pi}} open
> max_gradient 5
> pigment {rgb .9}
> }
> camera {
> location <10,10,10>
> look_at <0.0, 0.0, 0.0>
> }
>
> light_source { <50,50,50> 1 }
> background { rgb <0,.25,.5> }
>
> and I can get a result look like this
> http://imgur.com/jxElYiI
>
> but how can we make it look like this
>
> http://www.mitchr.me/SS/mjrcalc/lispy/exPovWaveGraph-ART_p.png
>
> Any suggestions and comments are appreciated.
You can use a scaled and translated gradient Pigment with a Color_map. Something
like this
#include "colors.inc"
isosurface {
function { sin(x)*sin(z)-y }
accuracy 0.001
contained_by{box{-2*pi,2*pi}} open
max_gradient 5
pigment {
gradient y
color_map {
[ 0 Blue ]
[ 0.5 Green ]
[ 1 Red ]
}
scale 2.02 // a Little bit larger than the object
translate <0,-1.01,0>
}
}
camera {
location <10,10,10>
look_at <0.0, 0.0, 0.0>
}
light_source { <50,50,50> 1 }
background { rgb <0,.25,.5> }
May be you will add additional entries to the Color_map.
Best regards,
Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks, that's very helpful.
Does Povray have predefined color functions so that we can use them instead of
manually set the color function every time? for example, commonly used color
function such as
hue, temperature map, jet, etc?
Best,
xslittlegrass
"MichaelJF" <mi-### [at] t-onlinede> wrote:
> "xslittlegrass" <nomail@nomail> wrote:
> > I'm trying to use POV-Ray to plot some mathematical 3d functions, and I can make
> > a simple plot of the function, but I don't know how to make it look beautiful.
> >
> > For example, I'm trying to plot this function
> >
> > y=Sin(x)*Cos(z)
> >
> > using this code:
> >
> > isosurface {
> > function { sin(x)*sin(z)-y }
> > accuracy 0.001
> > contained_by{box{-2*pi,2*pi}} open
> > max_gradient 5
> > pigment {rgb .9}
> > }
> > camera {
> > location <10,10,10>
> > look_at <0.0, 0.0, 0.0>
> > }
> >
> > light_source { <50,50,50> 1 }
> > background { rgb <0,.25,.5> }
> >
> > and I can get a result look like this
> > http://imgur.com/jxElYiI
> >
> > but how can we make it look like this
> >
> > http://www.mitchr.me/SS/mjrcalc/lispy/exPovWaveGraph-ART_p.png
> >
> > Any suggestions and comments are appreciated.
>
> You can use a scaled and translated gradient Pigment with a Color_map. Something
> like this
>
> #include "colors.inc"
>
> isosurface {
> function { sin(x)*sin(z)-y }
> accuracy 0.001
> contained_by{box{-2*pi,2*pi}} open
> max_gradient 5
> pigment {
> gradient y
> color_map {
> [ 0 Blue ]
> [ 0.5 Green ]
> [ 1 Red ]
> }
> scale 2.02 // a Little bit larger than the object
> translate <0,-1.01,0>
> }
> }
> camera {
> location <10,10,10>
> look_at <0.0, 0.0, 0.0>
> }
>
> light_source { <50,50,50> 1 }
> background { rgb <0,.25,.5> }
>
> May be you will add additional entries to the Color_map.
>
> Best regards,
> Michael
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Thanks, that's very helpful.
> Does Povray have predefined color functions so that we can use them instead of
> manually set the color function every time? for example, commonly used color
> function such as
> hue, temperature map, jet, etc?
>
> Best,
> xslittlegrass
>
>
Some patterns do have default colour palletes, those are: bozo, agate,
wood, checkers (block pattern yellow and green) and hexagon (block
pattern red, green and blue). All other patterns return a gray gradient
going from black to white if you don't provide any colour_map.
The thing is that, most of the time, using a user defined map gives
beter results.
If you find yourself using the same colour map again and again in many
scenes, you can create an .INC file containing the definition of your
favourite maps. It's then a simple thing of adding:
#include "My_colour_maps.inc"
to your file and using one of your user colour_map.
An INC file is the same thing as a POV file, it's only the extention
that is different.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <kua### [at] videotronca> wrote:
> > Thanks, that's very helpful.
> > Does Povray have predefined color functions so that we can use them instead of
> > manually set the color function every time? for example, commonly used color
> > function such as
> > hue, temperature map, jet, etc?
> >
> > Best,
> > xslittlegrass
> >
> >
>
> Some patterns do have default colour palletes, those are: bozo, agate,
> wood, checkers (block pattern yellow and green) and hexagon (block
> pattern red, green and blue). All other patterns return a gray gradient
> going from black to white if you don't provide any colour_map.
> The thing is that, most of the time, using a user defined map gives
> beter results.
>
> If you find yourself using the same colour map again and again in many
> scenes, you can create an .INC file containing the definition of your
> favourite maps. It's then a simple thing of adding:
> #include "My_colour_maps.inc"
> to your file and using one of your user colour_map.
>
> An INC file is the same thing as a POV file, it's only the extention
> that is different.
>
>
> Alain
Thanks a lot! That's very helpful.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|