POV-Ray : Newsgroups : povray.general : how to define my own object : Re: how to define my own object Server Time
1 Aug 2024 06:22:11 EDT (-0400)
  Re: how to define my own object  
From: Merrin Cullen
Date: 22 Feb 2006 15:45:19
Message: <43fccd5f@news.povray.org>
Simply declare the object:

#declare two_balls =
    union{
        sphere{<-5,0,0>,5 pigment{Blue}}
        sphere{<5,0,0>,5 pigment{Red}}
    }

When you wnat to use two_balls:

object{two_balls }

You can include transforms such as rotate and translate in the object
statement. If your spheres are not pigmented in dividually or in the union,
you can even apply a pigment/texture in the object statement.

"wenxu Zhang" <wxz### [at] hotmailcom> wrote in message
news:web.43fcca03d76f1b8dc0094d250@news.povray.org...
> Dear friends,
> How can I define my own object. For example, I like to define my own
object
> called two_balls, which includes two spheres. Then I can use it as the
> usual one, say, placing it somewhere, etc.
> Thank you
>
>
>


Post a reply to this message

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