POV-Ray : Newsgroups : povray.beta-test : Quad and Smooth_Quad macro Server Time
4 Nov 2024 12:59:18 EST (-0500)
  Quad and Smooth_Quad macro (Message 1 to 4 of 4)  
From: Thorsten
Subject: Quad and Smooth_Quad macro
Date: 2 Oct 2001 10:16:10
Message: <3BB9CBBB.2A60D60E@ewetel.net>
Hello :-))

How about changing the Quad and Smooth_Quad (shapes.inc) ?

The current form is:
#macro Quad(A, B, C, D)
   triangle {A, B, C}
   triangle {A, C, D}
#end
#macro Smooth_Quad(A, NA, B, NB, C, NC, D, ND)
   smooth_triangle {A, NA, B, NB, C, NC}
   smooth_triangle {A, NA, C, NC, D, ND}
#end

Maybe it's a question of preferences. But...
Any other form of shapes.inc (I've played around with so far)
can be used as object.
To keep this concept of having objects in shapes.inc
I suggest these changes:

#macro Quad(A, B, C, D)
union{ // added
   triangle {A, B, C}
   triangle {A, C, D}
} // added
#end
#macro Smooth_Quad(A, NA, B, NB, C, NC, D, ND)
union{ // added
   smooth_triangle {A, NA, B, NB, C, NC}
   smooth_triangle {A, NA, C, NC, D, ND}
} // added
#end

Or could there be any problems caused by declaring
the Quad and Smooth_Quad as unions?

Greetings :-))

Thorsten
(3.5beta4, various systems, windows)


Post a reply to this message

From: Gail Shaw
Subject: Re: Quad and Smooth_Quad macro
Date: 2 Oct 2001 10:47:52
Message: <3bb9d398@news.povray.org>
"Thorsten" <tho### [at] ewetelnet> wrote in message
news:3BB9CBBB.2A60D60E@ewetel.net...
> Hello :-))
>
> How about changing the Quad and Smooth_Quad (shapes.inc) ?
>
> Or could there be any problems caused by declaring
> the Quad and Smooth_Quad as unions?
>

I would guess these macros would be mainly used in converting 3d objects
made up of 4 sided polygons to a triangle mesh

ie

mesh {
 Quad(1,2,3,4)
 Quad(8,3,76,1)
 ......
}

This would cause a parse error if quad returned a union.

Gail
--
*************************************************************************
* gsh### [at] monotixcoza                *   Step into the abyss,           *
* http://www.rucus.ru.ac.za/~gail/   *   and let go.          Babylon 5 *
*************************************************************************
* Just think of me as the storm before the calm     Magic: The Gathering*
*************************************************************************


Post a reply to this message

From: Batronyx
Subject: Re: Quad and Smooth_Quad macro
Date: 2 Oct 2001 23:07:06
Message: <3bba80da@news.povray.org>
"Thorsten" <tho### [at] ewetelnet> wrote in message
news:3BB9CBBB.2A60D60E@ewetel.net...
> Hello :-))
>
> How about changing the Quad and Smooth_Quad (shapes.inc) ?
>
> The current form is:
> #macro Quad(A, B, C, D)
>    triangle {A, B, C}
>    triangle {A, C, D}
> #end
> #macro Smooth_Quad(A, NA, B, NB, C, NC, D, ND)
>    smooth_triangle {A, NA, B, NB, C, NC}
>    smooth_triangle {A, NA, C, NC, D, ND}
> #end
>
> Maybe it's a question of preferences. But...
> Any other form of shapes.inc (I've played around with so far)
> can be used as object.
> To keep this concept of having objects in shapes.inc
> I suggest these changes:
>
> #macro Quad(A, B, C, D)
> union{ // added
>    triangle {A, B, C}
>    triangle {A, C, D}
> } // added
> #end
> #macro Smooth_Quad(A, NA, B, NB, C, NC, D, ND)
> union{ // added
>    smooth_triangle {A, NA, B, NB, C, NC}
>    smooth_triangle {A, NA, C, NC, D, ND}
> } // added
> #end
>
> Or could there be any problems caused by declaring
> the Quad and Smooth_Quad as unions?
>
> Greetings :-))
>

You might have a point from a preference standpoint. However, the macro is best
left in its current form, as it would most likely be called several times within
a union{} or even mesh{} block.


Post a reply to this message

From: Thorsten
Subject: Re: Quad and Smooth_Quad macro
Date: 3 Oct 2001 00:47:57
Message: <3BBA980A.20954343@ewetel.net>
> I would guess these macros would be mainly used in converting 3d objects
> made up of 4 sided polygons to a triangle mesh

Oooops :-( So declaring a union would be extremely bad...

I think I'll will declare something like Union_Quad and Union_Smooth_Quad and
move them to MyInc.inc.

Thank you :-))

Thorsten


Post a reply to this message

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