POV-Ray : Newsgroups : povray.newusers : how to draw sth on the surface of a ball : Re: how to draw sth on the surface of a ball Server Time
4 Nov 2024 13:04:24 EST (-0500)
  Re: how to draw sth on the surface of a ball  
From: Mike Williams
Date: 4 Oct 2003 01:05:36
Message: <sjP3mJA8Slf$Ewr4@econym.demon.co.uk>
// Hi Mudong,
//
// Here's one that I found lying around on my system. I don't know who
// wrote it. I think it got posted to one of the povray groups in 
// January 2000, but I've so far failed to find the original posting.

#include "colors.inc"

background {color rgb <203/255, 203/255, 211/255>}

camera {location <0, 0, -3>}

light_source {<5, 0, -10> color White}

#declare Curl1 =
texture {
pigment {
average
pigment_map {
[1 cylindrical
color_map {
[0 .16 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
[.2 color Black]
[.3 .34 color Black color rgbt <1, 1, 1, 3>]
}
scale <.7, 1, .8>
rotate 90*x
translate <-.75, .25, 0>
]

[1 boxed
color_map {
[0 .18 color Black color Black]
[.2 1 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
}
scale 2
rotate -25*z
translate <-0, 1.5, 0>
]

[1 boxed
color_map {
[0 .18 color Black color Black]
[.2 1 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
}
scale 2
//rotate 25*z
translate <-2.25, 0, 0>
]
}
}
}

#declare Curl2 =

texture {
pigment {
average
pigment_map {
[1 cylindrical
color_map {
[0 .16 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
[.2 color Black]
[.3 .34 color Black color rgbt <1, 1, 1, 3>]
}
scale <.7, 1, .8>
rotate 90*x
translate <.75, .25, 0>
]

[1 boxed
color_map {
[0 .18 color Black color Black]
[.2 1 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
}
scale 2
rotate 25*z
translate <-0, 1.5, 0>
]

[1 boxed
color_map {
[0 .18 color Black color Black]
[.2 1 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
}
scale 2
//rotate 25*z
translate <2.25, 0, 0>
]
}
}
}

#declare Smiley_texture =
texture {
pigment {color Yellow}
finish {ambient .1 phong 0 phong_size 10 diffuse 1 metallic}
}

texture {
pigment {
spherical
color_map {
[0 .8 color rgbt <1, 1, 1, 1> color rgbt <1, 1, 1, 1>]
[.82 1 color Black color Black]
}
scale 1
translate -1*z
rotate <10, 20, 0>
}
finish {ambient .3}
}

texture {
pigment {
spherical
color_map {
[0 .8 color rgbt <1, 1, 1, 1> color rgbt <1, 1, 1, 1>]
[.82 1 color Black color Black]
}
scale 1
translate -1*z
rotate <10, -20, 0>
}
finish {ambient .3}
}

texture {
pigment {
average
pigment_map {
[1
cylindrical
color_map {
[0 .16 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
[.2 color Black]
[.3 .34 color Black color rgbt <1, 1, 1, 3>]
}
scale <.7, 1, .8>
rotate 90*x
]

[1
boxed
color_map {
[0 .18 color Black color Black]
[.2 1 color rgbt <1, 1, 1, 3> color rgbt <1, 1, 1, 3>]
}
scale 2
translate 1.4*y


]
}
}

}

texture {Curl1}

texture {Curl2}

sphere {<0, 0, 0>, 1 texture {Smiley_texture} }


Post a reply to this message

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