POV-Ray : Newsgroups : povray.newusers : Non-infinite Planes... Server Time
24 Nov 2024 23:42:06 EST (-0500)
  Non-infinite Planes... (Message 1 to 9 of 9)  
From: Simon
Subject: Non-infinite Planes...
Date: 28 May 2007 16:28:11
Message: <465b3b5b@news.povray.org>
Anyone know how I can get a plane that is non-infinite? I tried to do an 
intersection with a box and of course got everything in the box that was 
below the plane. I really want a lamina...

I'm currently using a VERY narrow box but... Any help appreciated.

Thanks!


Post a reply to this message

From: William Tracy
Subject: Re: Non-infinite Planes...
Date: 28 May 2007 16:39:17
Message: <465b3df5$1@news.povray.org>
Simon wrote:
> I'm currently using a VERY narrow box but... Any help appreciated.

That's actually probably the best solution. :-)

Otherwise, you could look into using triangles/mesh.

-- 
William Tracy
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|a|f|i|s|h|i|o|n|a|d|o|@|g|m|a|i|l|.|c|o|m|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|w|t|r|a|c|y|@|c|a|l|p|o|l|y|.|e|d|u|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
You know you've been raytracing too long when you can draw things 
quicker in POV-Ray than you can using a pencil and paper.
Dylan Beattie


Post a reply to this message

From: Marc
Subject: Re: Non-infinite Planes...
Date: 28 May 2007 16:39:20
Message: <465b3df8@news.povray.org>

465b3b5b@news.povray.org...
> Anyone know how I can get a plane that is non-infinite? I tried to do an 
> intersection with a box and of course got everything in the box that was 
> below the plane. I really want a lamina...
>
> I'm currently using a VERY narrow box but... Any help appreciated.
>
> Thanks!
>
A union of 2 triangles

MArc


Post a reply to this message

From: Chris B
Subject: Re: Non-infinite Planes...
Date: 28 May 2007 18:06:37
Message: <465b526d$1@news.povray.org>
"Simon" <povray@*NOSPAM*SOWare.co.uk> wrote in message 
news:465b3b5b@news.povray.org...
> Anyone know how I can get a plane that is non-infinite? I tried to do an 
> intersection with a box and of course got everything in the box that was 
> below the plane. I really want a lamina...
>
> I'm currently using a VERY narrow box but... Any help appreciated.
>
> Thanks!

Hi Simon,

It depends which infinite dimension you're not happy with and why. If a box 
doesn't do what you want then it sounds like you don't want something 
completely finite. You can make something that's only infinite in certain 
directions by intersecting the desired number of planes.
So, the following example uses 3 planes that give a thin slice that 
stretches away infinitely in the z, x and -x dimensions, but gives a crisp 
edge in the foreground. I've made the top surface slightly translucent so 
you can see the checkered plane beneath.

camera {location <0, 0.8,-2> look_at  <0,0,0>}
light_source { <0, 50, -30> color rgb <1,1,1>}
intersection {
  plane{y,0.01 pigment{color rgbt <1,1,1,0.3>}}
  plane{-y,0.01 pigment{checker}}
  plane{-z,0 pigment{color rgb <1,0,0>}}
}

Regards,
Chris B.


Post a reply to this message

From: Warp
Subject: Re: Non-infinite Planes...
Date: 28 May 2007 19:10:47
Message: <465b6177@news.povray.org>
IIRC infinitely thin boxes are actually allowed and render correctly.

  But I would go with a polygon or two triangles.

-- 
                                                          - Warp


Post a reply to this message

From: Trevor G Quayle
Subject: Re: Non-infinite Planes...
Date: 28 May 2007 19:55:02
Message: <web.465b6b55d3b25be25e73ab330@news.povray.org>
"Simon" <povray@*NOSPAM*SOWare.co.uk> wrote:
> Anyone know how I can get a plane that is non-infinite? I tried to do an
> intersection with a box and of course got everything in the box that was
> below the plane. I really want a lamina...
>
> I'm currently using a VERY narrow box but... Any help appreciated.
>
> Thanks!

Outside the suggestions already posted, the problem you were having is
because planes in POV are infinite, but they are not an infinite thin
surface.  Rather they have an inside and outside that extend in either
direction from the plane surface.  So any kind of intersection will get
what you did.
An alternative to use planes still would be to use the clipped_by rather
than intersection or difference, but the other suggestions are just as good
(maybe even better).

-tgq


Post a reply to this message

From: Tim Attwood
Subject: Re: Non-infinite Planes...
Date: 28 May 2007 20:51:10
Message: <465b78fe$1@news.povray.org>
You could use a polygon...

polygon {
    4, // number of corners
    <0, 0>, <0, 1>, <1, 1>, <1, 0>
}

Polygons can take 3D vectors, but they are
touchy about being flat, it's better to make
them 2D vectors then move it where-ever
if it isn't flat to one of the standard planes.

If you need a functional planar lamina you can
use an isosurface and let the containtained_by
box be mostly flat. Something like...
isosurface { // a cylinder
   function{ sqrt(pow(x,2) + pow(z,2)) - 1 }
   contained_by { box { <-2,-0.001,-2>, <2,0,2> } }
   threshold 0
}


Post a reply to this message

From: Urs Holzer
Subject: Re: Non-infinite Planes...
Date: 29 May 2007 06:06:53
Message: <465bfb3d@news.povray.org>
Simon wrote:
> Anyone know how I can get a plane that is non-infinite? I tried to do an
> intersection with a box and of course got everything in the box that was
> below the plane. I really want a lamina...

How about a disc?


Post a reply to this message

From: Tek
Subject: Re: Non-infinite Planes...
Date: 4 Jun 2007 20:27:01
Message: <4664add5@news.povray.org>
Personally I use a disc, polygon, or this:

plane {
    y, 0
    clipped_by { box { <-1,-1,-1>, <1,1,1> } }
}

clipped_by works sort of like intersection but it makes the sides of the box 
invisible.

BTW all of these shapes can cause problems if you want your shape to be 
translucent, infinitely thin surfaces can mess up certain effects. This can 
be fixed if it happens, but hopefully you won't run into that problem.

-- 
Tek
http://evilsuperbrain.com

"Simon" <povray@*NOSPAM*SOWare.co.uk> wrote in message 
news:465b3b5b@news.povray.org...
> Anyone know how I can get a plane that is non-infinite? I tried to do an 
> intersection with a box and of course got everything in the box that was 
> below the plane. I really want a lamina...
>
> I'm currently using a VERY narrow box but... Any help appreciated.
>
> Thanks!
>


Post a reply to this message

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