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:01:03 EST (-0500)
  Re: how to draw sth on the surface of a ball  
From: Hughes, B 
Date: 3 Oct 2003 02:08:11
Message: <3f7d124b@news.povray.org>
"mudong" <nomail@nomail> wrote in message
news:web.3f7ceb43d648f0f1fceeb1e0@news.povray.org...
> Thanks a lot, what I actually want is a curve(a smiling mouth) on the
> sphere, how to do that? thank you so much.

Well, "sth" is a contraction for the word something, unless I'm mistaken.
:-)

Christopher actually gave you a good way of doing it, just don't use text
and instead use a CSG object.

Try this, for example:

#declare Smile=
union {
 // eyes
 sphere {0,1 scale <1/12,1/6,1/2> translate <-1/3,1/4,-1/2>}
 sphere {0,1 scale <1/12,1/6,1/2> translate <1/3,1/4,-1/2>}
difference {
 // mouth
    cylinder {-z*2,0,1 translate y/2}
    cylinder {-z*2,0,1.25 translate y}
    scale <0.5,0.25,0.5> translate -y/4
}
 // mouth corners
 sphere {0,1 scale <1/20,1/10,1/2> rotate -30*z translate <-1/2,-1/5,-1/2>}
 sphere {0,1 scale <1/20,1/10,1/2> rotate 30*z translate <1/2,-1/5,-1/2>}
}

sphere {
 0,1
 pigment {
  object {
   Smile
      pigment { color red 1.6 green 1.4 blue 0 }
      pigment { color rgb 0 }
  }
 }
 scale 2 translate y
}

Sorry if you wanted to make it yourself, or sth (ha ha), but I just had to
try it myself to see it and figured you might as well have it to look over.

Bob H.


Post a reply to this message

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