POV-Ray : Newsgroups : povray.advanced-users : Box using different points Server Time
22 Dec 2024 16:09:26 EST (-0500)
  Box using different points (Message 1 to 9 of 9)  
From: bakom
Subject: Box using different points
Date: 8 May 2015 12:35:00
Message: <web.554ce5a3d4e4487a4fa5c5bf0@news.povray.org>
Hello, I am using Box macro for making box but it uses only two points.
I have eight points as
a<0, 0, 0>
b<1, 0, 0>
c<1, 1, 0>
d<0, 1, 0>
e<0, 1, 1>
f<0, 0, 1>
g<1, 0, 1>
h<1, 1, 1>

How can I make a box using all these eight points?


--
Gurwinder Singh Bains


Post a reply to this message

From: kurtz le pirate
Subject: Re: Box using different points
Date: 8 May 2015 12:53:46
Message: <554cea1a$1@news.povray.org>

> Hello, I am using Box macro for making box but it uses only two points.
> I have eight points as
> a<0, 0, 0>
> b<1, 0, 0>
> c<1, 1, 0>
> d<0, 1, 0>
> e<0, 1, 1>
> f<0, 0, 1>
> g<1, 0, 1>
> h<1, 1, 1>
>
> How can I make a box using all these eight points?

You can't. POVRay deals only real objects



---
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Le Forgeron
Subject: Re: Box using different points
Date: 8 May 2015 13:00:32
Message: <554cebb0$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 08/05/2015 18:53, kurtz le pirate a écrit :
> Le 08/05/2015 18:34, bakom a écrit :
>> Hello, I am using Box macro for making box but it uses only two
>> points. I have eight points as a<0, 0, 0> b<1, 0, 0> c<1, 1, 0> 
>> d<0, 1, 0> e<0, 1, 1> f<0, 0, 1> g<1, 0, 1> h<1, 1, 1>
>> 
>> How can I make a box using all these eight points?
> 
> You can't. POVRay deals only real objects
> 

There is 8 corners to a box, povray only wants you to specify the two
in pair along any of the four great diagonal.

a,h is ok, as are (b,e), (c,f) and (d,g).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlVM668ACgkQhKAm8mTpkW2XCgP/Ztf10l6je4uV765krTsJJp0p
VR+eXy6YS9zRi1ZkAXC+WLGqQsgdFQZ911ZIbK6joGCNYEDCZztW8FtAksSTvvlA
8W8/nB2mAJRRpuKZHTUx9kogvmSpfGksmo71Il/6V8fQs+PvTAniHddEtfSSq5rU
QNJpNlJ92SB/FNzoE3g=
=GDH0
-----END PGP SIGNATURE-----


Post a reply to this message

From: Doctor John
Subject: Re: Box using different points
Date: 8 May 2015 13:01:52
Message: <554cec00$1@news.povray.org>
On 08/05/15 17:34, bakom wrote:
> Hello, I am using Box macro for making box but it uses only two points.
> I have eight points as
> a<0, 0, 0>
> b<1, 0, 0>
> c<1, 1, 0>
> d<0, 1, 0>
> e<0, 1, 1>
> f<0, 0, 1>
> g<1, 0, 1>
> h<1, 1, 1>
> 
> How can I make a box using all these eight points?

I'm not sure if I'm missing something here, but surely you only ever
need two points. In your example, these would be <0, 0, 0> and <1, 1, 1>

John
-- 
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children


Post a reply to this message

From: Sereib
Subject: Re: Box using different points
Date: 9 May 2015 13:00:00
Message: <web.554e3be060156bc7fedbcc650@news.povray.org>
Hi,

maybe it's better to say, you only ever need

1) Two points, and

2) The side condition that these two points are opposite corners

But it's never reasonable that you define a box by 8 points, since 8 points
don't always form a box - even 3 points might be too much: 2 define the box, and
the third might be located elsewhere in space (if I'm tight ...).



Doctor John <j.g### [at] gmailcom> wrote:
> On 08/05/15 17:34, bakom wrote:
> > Hello, I am using Box macro for making box but it uses only two points.
> > I have eight points as
> > a<0, 0, 0>
> > b<1, 0, 0>
> > c<1, 1, 0>
> > d<0, 1, 0>
> > e<0, 1, 1>
> > f<0, 0, 1>
> > g<1, 0, 1>
> > h<1, 1, 1>
> >
> > How can I make a box using all these eight points?
>
> I'm not sure if I'm missing something here, but surely you only ever
> need two points. In your example, these would be <0, 0, 0> and <1, 1, 1>
>
> John
> --
> Protect the Earth
> It was not given to you by your parents
> You hold it in trust for your children


Post a reply to this message

From: Doctor John
Subject: Re: Box using different points
Date: 9 May 2015 17:09:27
Message: <554e7787$1@news.povray.org>
On 09/05/15 17:54, Sereib wrote:
> Hi,
> 
> maybe it's better to say, you only ever need
> 
> 1) Two points, and
> 
> 2) The side condition that these two points are opposite corners
> 

Indeed. I didn't make my self clear enough - mea culpa

John
-- 
Protect the Earth
It was not given to you by your parents
You hold it in trust for your children


Post a reply to this message

From: Alain
Subject: Re: Box using different points
Date: 10 May 2015 02:10:51
Message: <554ef66b@news.povray.org>

> Hello, I am using Box macro for making box but it uses only two points.
> I have eight points as
> a<0, 0, 0>
> b<1, 0, 0>
> c<1, 1, 0>
> d<0, 1, 0>
> e<0, 1, 1>
> f<0, 0, 1>
> g<1, 0, 1>
> h<1, 1, 1>
>
> How can I make a box using all these eight points?
>
>
> --
> Gurwinder Singh Bains
>
>

By definition, a box have faces that are parallel two by two and are 
also perpendicular to the other 4 faces.
As, initialy, the box's faces are all parallel to the base planes, you 
only need two oposite corners.

If you realy need more than that, you are no longer dealing with a box 
but some variation of an hexaedron.
If, additionaly, those faces are not flat, you have a twisted hexaedron, 
or some other beast that may, or not, self intersect.




Alain


Post a reply to this message

From: LanuHum
Subject: Re: Box using different points
Date: 10 May 2015 05:10:01
Message: <web.554f1f9260156bc77a3e03fe0@news.povray.org>
"bakom" <gswithbains> wrote:
> Hello, I am using Box macro for making box but it uses only two points.
> I have eight points as
> a<0, 0, 0>
> b<1, 0, 0>
> c<1, 1, 0>
> d<0, 1, 0>
> e<0, 1, 1>
> f<0, 0, 1>
> g<1, 0, 1>
> h<1, 1, 1>
>
> How can I make a box using all these eight points?
>
>
> --
> Gurwinder Singh Bains

#declare Default_texture = pigment {rgb 0.8}


#declare a = <0, 0, 0>;
#declare b = <1, 0, 0>;
#declare c = <1, 1, 0>;
#declare d = <0, 1, 0>;
#declare e = <0, 1, 1>;
#declare f = <0, 0, 1>;
#declare g = <1, 0, 1>;
#declare h = <1, 1, 1>;

#declare Box = mesh{

triangle{a,b,c}
triangle{a,c,d}
triangle{a,d,f}
triangle{e,d,f}
triangle{c,d,e}
triangle{c,e,h}
triangle{a,b,g}
triangle{a,f,g}
triangle{b,c,g}
triangle{g,h,c}
triangle{e,f,g}
triangle{e,g,h}

texture{Default_texture}
}

Box


Post a reply to this message

From: bakom
Subject: Re: Box using different points
Date: 18 May 2015 02:15:01
Message: <web.5559820f60156bc75d0ff6fc0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "bakom" <gswithbains> wrote:
> > Hello, I am using Box macro for making box but it uses only two points.
> > I have eight points as
> > a<0, 0, 0>
> > b<1, 0, 0>
> > c<1, 1, 0>
> > d<0, 1, 0>
> > e<0, 1, 1>
> > f<0, 0, 1>
> > g<1, 0, 1>
> > h<1, 1, 1>
> >
> > How can I make a box using all these eight points?
> >
> >
> > --
> > Gurwinder Singh Bains
>
> #declare Default_texture = pigment {rgb 0.8}
>
>
> #declare a = <0, 0, 0>;
> #declare b = <1, 0, 0>;
> #declare c = <1, 1, 0>;
> #declare d = <0, 1, 0>;
> #declare e = <0, 1, 1>;
> #declare f = <0, 0, 1>;
> #declare g = <1, 0, 1>;
> #declare h = <1, 1, 1>;
>
> #declare Box = mesh{
>
> triangle{a,b,c}
> triangle{a,c,d}
> triangle{a,d,f}
> triangle{e,d,f}
> triangle{c,d,e}
> triangle{c,e,h}
> triangle{a,b,g}
> triangle{a,f,g}
> triangle{b,c,g}
> triangle{g,h,c}
> triangle{e,f,g}
> triangle{e,g,h}
>
> texture{Default_texture}
> }
>
> Box


Great, thats what I was trying but can get it because I was doing mistake by not
writing all the triangles into mesh.
Thanks :)


Post a reply to this message

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