POV-Ray : Newsgroups : povray.advanced-users : A macro I'm proud of I think (public Beta) : Re: A macro I'm proud of I think (public Beta) Server Time
29 Jul 2024 18:18:25 EDT (-0400)
  Re: A macro I'm proud of I think (public Beta)  
From: MPunk3
Date: 1 May 2001 21:07:09
Message: <3aef5dbd$1@news.povray.org>
Dan,

I was kind of surprised to see the sign-discussion spawned with no mention
of your macro, too. The macro is very cool, in my opinion. In fact, this
will be a life-saver for me if it you can work out the bugs -- I'm rendering
a house with very strange roof-lines, which in real life were cut
on-the-fly, which makes for very complicated work to reproduce accurately in
POV.

I've been playing with it, and it never seems to generate a plane with a
negative normal. I did this quick test:

Four_point_plane(<0,16,7>,<0,16,45.3>,<19,22,26.15>,<1,-100,26.15>)

I tried y=+/-100 in the fourth vector, and the results are the same in both
cases. The angle and position of the plane looks perfect, but the vector is
always positive (the plane is always solid "pointing down", towards y=0).

This box roughly defines the size of the house I'm rendering so you can see
how this plane cuts it and how the points are positioned relative to most of
the rest of the model:

box{<0,0,7> <66,22,45.3>}

Unless I misunderstand the usage, changing y from 100 to -100 in this case
should flip the plane "up" and "down", correct?

--Jon


"Dan Johnson" <zap### [at] hotmailcom> wrote in message
news:3AEEF4DF.27E6A513@hotmail.com...
> Wlodzimierz ABX Skiba wrote:
>
> > Chris Huff wrote in message ...
> > >In article <3aed54c7@news.povray.org>, "Wlodzimierz ABX Skiba"
> > ><abx### [at] abxartpl> wrote:
> > >
> > > > also in megapov there is inclusion of Chris Chuff which builds-in
function
> > > > sign() to available keywords
> > >
> > > Actually, it's sgn()...I was too lazy to get it to work properly with
> > > "sign", which is already used elsewhere...and as far as I know, hasn't
> > > been added to MegaPOV for this reason. Since it won't be in POV 3.5,
you
> > > might as well use a macro.
> >
> > I found in tokenize.c entry
> >   {SGN_TOKEN, "sgn"}, /*Chris Huff jan 2001*/
> > then look for SGN_TOKEN in other files and found in express.c
> >   case SGN_TOKEN: /*Chris Huff "sign() function"*/
> > then forgot about sgn() and remembered sign()
> >
> > but now I write:
> >   #version unofficial megapov 0.7;
> >   #warning concat(str(sgn(100),0,0),"\n")
> >
> > and it won't work ???
> >
> > > Oh, and it's Chris Huff. ;-)
> >
> > I try remember ;-)
> > The reason is that both ("H" and "CH") have identical vocalizations in
polish.
> >
> > ABX
>
> Sign was originally part of the four point plane macro, but I found that
version
> had huge bugs.  When I rewrote it the guts of the program were very
different, and
> I didn't need it anymore.  If I thought a stupid little program I wrote in
30
> seconds to save myself typing elsewhere was going to take all the
attention away
> from the main point of my post I wouldn't have included it.  Maybe I am
being
> selfish, sorry, but I still don't know if I should be proud of the program
I spent
> hours on, because I am not completely confident that it works right.
>
>
> --
> Dan Johnson
>
> http://www.geocities.com/zapob
>
>


Post a reply to this message

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