POV-Ray : Newsgroups : povray.newusers : How to compose an arbitrary solid object Server Time
5 Nov 2024 11:20:59 EST (-0500)
  How to compose an arbitrary solid object (Message 1 to 6 of 6)  
From: Skelter
Subject: How to compose an arbitrary solid object
Date: 30 Jul 1999 12:26:17
Message: <37a1d229@news.povray.org>
Let's say I'm trying to compose a crystal gravy boat.  (Yes, such a thing
would probably be gross on your dinner table, and "no" it isn't my real
project, but it's a nice reduction.)

I can describe all the surfaces using spatch, but if I do, I can't seem to
give a "well defined inside and outside" so that PovRay can do the
refraction.  How horrible!  I can't compose an arbitary 3D object!  Or is
there something I'm missing.  Yes, I know there are finite solid primitives,
but I don't feel they give me the control I would like.

Any suggestions?


Post a reply to this message

From: Ken
Subject: Re: How to compose an arbitrary solid object
Date: 30 Jul 1999 13:02:24
Message: <37A1D9FF.8D06217D@pacbell.net>
Skelter wrote:
> 
> Let's say I'm trying to compose a crystal gravy boat.  (Yes, such a thing
> would probably be gross on your dinner table, and "no" it isn't my real
> project, but it's a nice reduction.)
> 
> I can describe all the surfaces using spatch, but if I do, I can't seem to
> give a "well defined inside and outside" so that PovRay can do the
> refraction.  How horrible!  I can't compose an arbitary 3D object!  Or is
> there something I'm missing.  Yes, I know there are finite solid primitives,
> but I don't feel they give me the control I would like.
> 
> Any suggestions?

  Problem you have here is that you have pretty much defined the problem and
there is no real solution other that using solid construction methods. Finite
patch primitives are useful little buggers but the one or two restrictions
they have can be a bother. You can't even use them in CSG operations to
carve out shapes from the solid primitives with and their thickness is so
thin they make poor refractive objects (boo oho). You can achieve better
refraction characteristics by building a double wall construct but this is
even more time consuming and the results are not always predictable.

  Maybe a little inspiration is in order. Visit the Pov objects collection
and take a look at the excellent planked wood boat that Mick donated to
the collection. Perhaps through his example you can gain greater insight
into the fine are of CSG primitive modelling techniques :)

http://povobjects.virtualave.net/

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: Ron Parker
Subject: Re: How to compose an arbitrary solid object
Date: 30 Jul 1999 13:38:24
Message: <37a1e310@news.povray.org>
On Fri, 30 Jul 1999 09:59:43 -0700, Ken wrote:
>  Problem you have here is that you have pretty much defined the problem and
>there is no real solution other that using solid construction methods. Finite
>patch primitives are useful little buggers but the one or two restrictions
>they have can be a bother. You can't even use them in CSG operations to
>carve out shapes from the solid primitives with and their thickness is so
>thin they make poor refractive objects (boo oho).

Not so.  Render the scene below and you'll see what I mean.  

The first cube (from the left) is made of six bicubic patches with no
interior, for reference.  The next cube is made of six "unrelated"
bicubic patches, each with its own interior.  The third cube is a 
union of bicubic patches, with one interior for the whole union.
The last cube is a box, again for reference.

Notice that the third and fourth cubes have the same basic refractive
characteristics.  The second cube is broken because POV can't make the
correlation between the distinct patches and their interiors, so it
bends the ray upon entry to the first patch but hitting subsequent
patches has no effect because they have the same ior as the material
that the ray is already traveling through.  POV interprets this as 
"entering a new object" instead of "leaving the object we were in"
because it uses the interiors to distinguish one object from another.
Since the patches have different interiors, they are different 
objects.

So, you can use patch objects to do refraction.  You just have to 
be careful.

----------------- cut here ------->8===========

camera {location <-1,5,-5> look_at -x}
light_source {<-20,20,-20> rgb 1 shadowless}
light_source {<20,20,-20> rgb 1 shadowless}

plane {y,0 texture {pigment {checker rgb .5,rgb 1}} rotate 30*y}

#declare patch=bicubic_patch { type 1 flatness .1 u_steps 3 v_steps 3 
                <-.5,-.5,-.5> <-.4,-.5,-.5> <.4,-.5,-.5> <.5,-.5,-.5>
                <-.5,-.4,-.5> <-.4,-.4,-.5> <.4,-.4,-.5> <.5,-.4,-.5>
                <-.5,.4,-.5> <-.4,.4,-.5> <.4,.4,-.5> <.5,.4,-.5>
                <-.5,.5,-.5> <-.4,.5,-.5> <.4,.5,-.5> <.5,.5,-.5>
              }

#declare pig=pigment {color rgbt .7}

//cube 1
object {patch rotate 000*x translate y-4*x texture {pig}}
object {patch rotate 090*x translate y-4*x texture {pig}}
object {patch rotate 180*x translate y-4*x texture {pig}}
object {patch rotate 270*x translate y-4*x texture {pig}}
object {patch rotate 090*y translate y-4*x texture {pig}}
object {patch rotate 270*y translate y-4*x texture {pig}}

//cube 2
object {patch rotate 000*x translate y-2*x texture {pig} interior {ior 1.3}}
object {patch rotate 090*x translate y-2*x texture {pig} interior {ior 1.3}}
object {patch rotate 180*x translate y-2*x texture {pig} interior {ior 1.3}}
object {patch rotate 270*x translate y-2*x texture {pig} interior {ior 1.3}}
object {patch rotate 090*y translate y-2*x texture {pig} interior {ior 1.3}}
object {patch rotate 270*y translate y-2*x texture {pig} interior {ior 1.3}}

// cube 3
union {
object {patch rotate 000*x translate y texture {pig}}
object {patch rotate 090*x translate y texture {pig}}
object {patch rotate 180*x translate y texture {pig}}
object {patch rotate 270*x translate y texture {pig}}
object {patch rotate 090*y translate y texture {pig}}
object {patch rotate 270*y translate y texture {pig}}
interior {ior 1.3} 
}
             
// cube 4 
box { -.5 .5 translate y+2*x texture {pig} interior {ior 1.3}}
----------------- cut here ------->8===========


Post a reply to this message

From: Skelter
Subject: Re: How to compose an arbitrary solid object
Date: 30 Jul 1999 17:00:39
Message: <37a21277@news.povray.org>
Don't make me write a utility to construct these individual plate pieces
from a patch and then glue them together!


Ron Parker wrote in message <37a1e310@news.povray.org>...
>On Fri, 30 Jul 1999 09:59:43 -0700, Ken wrote:
>>  Problem you have here is that you have pretty much defined the problem
and
>>there is no real solution other that using solid construction methods.
Finite
>>patch primitives are useful little buggers but the one or two restrictions
>>they have can be a bother. You can't even use them in CSG operations to
>>carve out shapes from the solid primitives with and their thickness is so
>>thin they make poor refractive objects (boo oho).
>
>Not so.  Render the scene below and you'll see what I mean.
>
>The first cube (from the left) is made of six bicubic patches with no
>interior, for reference.  The next cube is made of six "unrelated"
>bicubic patches, each with its own interior.  The third cube is a
>union of bicubic patches, with one interior for the whole union.
>The last cube is a box, again for reference.
>
>Notice that the third and fourth cubes have the same basic refractive
>characteristics.  The second cube is broken because POV can't make the
>correlation between the distinct patches and their interiors, so it
>bends the ray upon entry to the first patch but hitting subsequent
>patches has no effect because they have the same ior as the material
>that the ray is already traveling through.  POV interprets this as
>"entering a new object" instead of "leaving the object we were in"
>because it uses the interiors to distinguish one object from another.
>Since the patches have different interiors, they are different
>objects.
>
>So, you can use patch objects to do refraction.  You just have to
>be careful.
>
>----------------- cut here ------->8===========
>
>camera {location <-1,5,-5> look_at -x}
>light_source {<-20,20,-20> rgb 1 shadowless}
>light_source {<20,20,-20> rgb 1 shadowless}
>
>plane {y,0 texture {pigment {checker rgb .5,rgb 1}} rotate 30*y}
>
>#declare patch=bicubic_patch { type 1 flatness .1 u_steps 3 v_steps 3
>                <-.5,-.5,-.5> <-.4,-.5,-.5> <.4,-.5,-.5> <.5,-.5,-.5>
>                <-.5,-.4,-.5> <-.4,-.4,-.5> <.4,-.4,-.5> <.5,-.4,-.5>
>                <-.5,.4,-.5> <-.4,.4,-.5> <.4,.4,-.5> <.5,.4,-.5>
>                <-.5,.5,-.5> <-.4,.5,-.5> <.4,.5,-.5> <.5,.5,-.5>
>              }
>
>#declare pig=pigment {color rgbt .7}
>
>//cube 1
>object {patch rotate 000*x translate y-4*x texture {pig}}
>object {patch rotate 090*x translate y-4*x texture {pig}}
>object {patch rotate 180*x translate y-4*x texture {pig}}
>object {patch rotate 270*x translate y-4*x texture {pig}}
>object {patch rotate 090*y translate y-4*x texture {pig}}
>object {patch rotate 270*y translate y-4*x texture {pig}}
>
>//cube 2
>object {patch rotate 000*x translate y-2*x texture {pig} interior {ior
1.3}}
>object {patch rotate 090*x translate y-2*x texture {pig} interior {ior
1.3}}
>object {patch rotate 180*x translate y-2*x texture {pig} interior {ior
1.3}}
>object {patch rotate 270*x translate y-2*x texture {pig} interior {ior
1.3}}
>object {patch rotate 090*y translate y-2*x texture {pig} interior {ior
1.3}}
>object {patch rotate 270*y translate y-2*x texture {pig} interior {ior
1.3}}
>
>// cube 3
>union {
>object {patch rotate 000*x translate y texture {pig}}
>object {patch rotate 090*x translate y texture {pig}}
>object {patch rotate 180*x translate y texture {pig}}
>object {patch rotate 270*x translate y texture {pig}}
>object {patch rotate 090*y translate y texture {pig}}
>object {patch rotate 270*y translate y texture {pig}}
>interior {ior 1.3}
>}
>
>// cube 4
>box { -.5 .5 translate y+2*x texture {pig} interior {ior 1.3}}
>----------------- cut here ------->8===========
>


Post a reply to this message

From: Ken
Subject: Re: How to compose an arbitrary solid object
Date: 30 Jul 1999 17:55:50
Message: <37A21EBF.674B2AC8@pacbell.net>
Skelter wrote:
> 
> Don't make me write a utility to construct these individual plate pieces
> from a patch and then glue them together!

That sir is what spatch is for unless you really want to make a new patch
utility for the fun of it.

-- 
Ken Tyler
  
mailto://tylereng@pacbell.net
http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

From: Skelter
Subject: Re: How to compose an arbitrary solid object
Date: 5 Aug 1999 16:47:27
Message: <37a9f85f@news.povray.org>
But from what I'm being told, the spatch's can't be used to make a "solid"
object with refraction/interior/media.

What I'm talking about would let you design an arbitary solid surface of
specified thickness given a patch-like definition.




Ken wrote in message <37A21EBF.674B2AC8@pacbell.net>...
>
>
>Skelter wrote:
>>
>> Don't make me write a utility to construct these individual plate pieces
>> from a patch and then glue them together!
>
>That sir is what spatch is for unless you really want to make a new patch
>utility for the fun of it.
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net
>http://home.pacbell.net/tylereng/links.htm


Post a reply to this message

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