POV-Ray : Newsgroups : povray.unofficial.patches : Something fresh - symetry operator patch Server Time
21 Jul 2024 01:26:30 EDT (-0400)
  Something fresh - symetry operator patch (Message 10 to 19 of 19)  
<<< Previous 9 Messages Goto Initial 10 Messages
From: Wlodzimierz ABX Skiba
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 09:00:29
Message: <3afbe26d@news.povray.org>
Ron Parker wrote in message ...
> On Fri, 11 May 2001 09:04:59 +0200, Wlodzimierz ABX Skiba wrote:
> > x and x+y has meaning of vectors in POV (center of symetry)
> > ox is not <1,0,0> but axis x
>
> But there's no difference.

for geometry symmetry it is difference
I wanted translate symmetry from math to syntax
A=<3,2,3> symetry by x (<1,0,0>) -> A'=<-2,-2,-3>
A=<4,2,3> symetry by axis ox -> A'=<4,-2,-3>

> > and patch becouse now I'm adding support for plane{}
> > #local B=A@plane{y 1 rotate C translate z}
>
> And that macro would happily do this part as well.


and it is as easy to understand and code ?

ABX
--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 09:02:22
Message: <3afbe2de@news.povray.org>
Ron Parker wrote in message ...
> On Fri, 11 May 2001 09:04:59 +0200, Wlodzimierz ABX Skiba wrote:
> >inspired by my current work and short sigs it was just too much for me to
type
> ><-A.x,A.y,A.z> to change sign only for one coordinate
>
> Yeah, I thought about making patches to make it easier to make a really short
> sig too, but where's the fun in that?

I never said I want use it for sigs. I just was inspired by them for my current
scene.


--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Ron Parker
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 09:11:24
Message: <slrn9fnp81.m41.ron.parker@fwi.com>
On Fri, 11 May 2001 15:01:28 +0200, Wlodzimierz ABX Skiba wrote:
>Ron Parker wrote in message ...
>> On Fri, 11 May 2001 09:04:59 +0200, Wlodzimierz ABX Skiba wrote:
>> >inspired by my current work and short sigs it was just too much for me to
>type
>> ><-A.x,A.y,A.z> to change sign only for one coordinate
>>
>> Yeah, I thought about making patches to make it easier to make a really short
>> sig too, but where's the fun in that?
>
>I never said I want use it for sigs. I just was inspired by them for my current
>scene.

<voice type="bad foghorn leghorn impression">
That was a joke, son.
</voice>

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Ron Parker
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 09:19:38
Message: <slrn9fnpnf.m41.ron.parker@fwi.com>
On Fri, 11 May 2001 14:59:37 +0200, Wlodzimierz ABX Skiba wrote:
>Ron Parker wrote in message ...
>> On Fri, 11 May 2001 09:04:59 +0200, Wlodzimierz ABX Skiba wrote:
>> > x and x+y has meaning of vectors in POV (center of symetry)
>> > ox is not <1,0,0> but axis x
>>
>> But there's no difference.
>
>for geometry symmetry it is difference
>I wanted translate symmetry from math to syntax
>A=<3,2,3> symetry by x (<1,0,0>) -> A'=<-2,-2,-3>
>A=<4,2,3> symetry by axis ox -> A'=<4,-2,-3>

Ah, well the macro I gave mirrors the first vector about the axis defined 
by the second vector (unless the second vector is zero.)  To mirror around
a point, you'd need to do

#macro PtSym( Vec, Pt )
  (2*Pt-Vec)
#end

>> And that macro would happily do this part as well.
>
>and it is as easy to understand and code ?

Once someone else has written the macro, probably easier to understand, and
only a few more keystrokes to code.  Making it have the syntax of an operator
is fun, but it quickly leads to code that looks like line noise.  I can see
more use for having shorter versions of vnormalize, vcross, and vdot than I 
can for vector symmetry, but that's not likely to happen either (though maybe
one could make an argument for |V| to mean vnormalize...)

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 10:07:07
Message: <3afbf20b@news.povray.org>
Ron Parker wrote in message ...
> <voice type="bad foghorn leghorn impression">
> That was a joke, son.
> </voice>


and smile was in the header ? :-)

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 10:26:26
Message: <3afbf692@news.povray.org>
Ron Parker wrote in message ...
> Ah, well the macro I gave mirrors the first vector about the axis defined
> by the second vector (unless the second vector is zero.)  To mirror around
> a point, you'd need to do
>
> #macro PtSym( Vec, Pt )
>  (2*Pt-Vec)
> #end

Yes, I know, it's part of my patch.
Please don't show me any more examples of how code this - I know it!
Also I know that we don't need dot operator for vector.
Just vdot(V,x) instead of V.x
We don't need A?B:C becouse #if(A)B#else C #end works fine
I just needed it becouse of less typing and more natural for me

> it quickly leads to code that looks like line noise.

just like our sigs

> (though maybe
> one could make an argument for |V| to mean vnormalize...)

good idea

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Ron Parker
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 10:36:53
Message: <slrn9fnu8a.m5m.ron.parker@fwi.com>
On Fri, 11 May 2001 16:25:37 +0200, Wlodzimierz ABX Skiba wrote:
>Please don't show me any more examples of how code this - I know it!

Perhaps you didn't notice everyone else who's reading this.  I just did
the macros to show that it can be done; in the past when I've claimed that
something was more easily done with macros than with a patch, I've gotten
a lot of static from people who want me to put up or shut up, so now I 
give examples with my claims.  Don't take it personally.

>Also I know that we don't need dot operator for vector.
>Just vdot(V,x) instead of V.x
>We don't need A?B:C becouse #if(A)B#else C #end works fine
>I just needed it becouse of less typing and more natural for me

But my point was that it's not natural.  "@" doesn't mean anything like
that in any other language, and saying "A at B" in english doesn't convey
any sort of symmetry meaning, so the syntax is highly unnatural.  Those
other operators might be unnatural, too, to someone with no experience with
other languages, but at least they makes sense to some of us.

>> it quickly leads to code that looks like line noise.
>
>just like our sigs

Not even close.  Both of us have sigs that consist mostly of what looks
like English words, but something like (<4,3,2>@x+y@<5,6.7,8>).z really
does look like noise.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Warp
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 11:04:05
Message: <3afbff64@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:
: one could make an argument for |V| to mean vnormalize...)

  I suppose you mean vlength?


-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Wlodzimierz ABX Skiba
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 11:06:21
Message: <3afbffed$1@news.povray.org>
Ron Parker wrote in message ...
> Don't take it personally.

now that's more clear :-)

> > Also I know that we don't need dot operator for vector.
> > Just vdot(V,x) instead of V.x
> > We don't need A?B:C becouse #if(A)B#else C #end works fine
> > I just needed it becouse of less typing and more natural for me
>
> But my point was that it's not natural.  "@" doesn't mean anything like
> that in any other language

I expleined somwhere at begining that I get "@" becouse it was only free - I
want get "|" as symbol of mirror but it was reserved for other operations

> and saying "A at B" in english doesn't convey any sort of symmetry meaning

I don't like it too

> > just like our sigs
>
> Not even close.  Both of us have sigs that consist mostly of what looks
> like English words, but something like (<4,3,2>@x+y@<5,6.7,8>).z really
> does look like noise.


what about :

x / |x| + ( x $X = ( x @ x ) . x ^ ( x * x ) ;)

--
#macro Sig(A,B,X)_(A,B)_(B,X)_(X,A)#end#macro _(A,B)cylinder{<A.x,A.y,3>,<B.u,
B.v,3>.1,9}#end global_settings{max_trace_level 9}light_source{0 1}camera{up y
*4right-3*x}blob{_(<3,1>,<1,-5>)_(<2,-2>,<4,-2>)Sig(x,<-1,1.5>,<1,3>)_(z-1,z-4
)pigment{rgb 1}}box{-3 3pigment{rgb 0}finish{reflection 1}hollow} // POV-Ray31


Post a reply to this message

From: Ron Parker
Subject: Re: Something fresh - symetry operator patch
Date: 11 May 2001 11:10:42
Message: <slrn9fo07n.m7q.ron.parker@fwi.com>
On 11 May 2001 11:04:05 -0400, Warp wrote:
>Ron Parker <ron### [at] povrayorg> wrote:
>: one could make an argument for |V| to mean vnormalize...)
>
>  I suppose you mean vlength?

Of course.  I was thinking vlength but wrote vnormalize.  D'oh!

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

<<< Previous 9 Messages Goto Initial 10 Messages

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