|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ideal 76x4 sign :) "M" is for Rafal _M_aj
It was a horrible experience, when sign was 76*4 except for last line that
was 1 byte longer ;)
I had in that line pigment{ ... scale .007 }
after changing scale to .7 it was 75x4 but the texture was way too big,
so I desided to move sphere{} by z*20 to get simmilar result and increase
it's radius to get simmilar result.
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
question - in 76x4 sign, can I accualy use the 76-th char ? or can I use 75
chars, and the 76-th is '\n' ?
btw. how about competition for 76x4 (or maybe 80x5) scenes :) ?
image in .b.i
--
> A jedyne co czytam, ze to terrorysci internetowi z echelonu planuja
> kolejny atak na centrale TPSA
- Expert vel Jacek (obecnie gol### [at] pocztaonetpl)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 20 Jul 2002 13:54:04 -0400, "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:
> #macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
> pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
> );g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
> y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
what about:
light_source{y#macro p(c)#if(c>1)#local l=mod(c,100);g(x-2*div(l,10)+8,y-2*
mod(l,10)+8,0)*p(div(c,100))#end#end#local s=function{z*sqrt(pow(x,2)+pow(y
,2))}2}sphere{z*20#local g=function{.4*abs(sin(s(x,y,9)))*pow(1-min(1,s(x,y
,.3)),2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
> btw. how about competition for 76x4 (or maybe 80x5) scenes :) ?
do you know:
http://10best.raytrace.com/short/shortvote.html
http://10best.raytrace.com/short2/shortvote2.html
?
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>
> On 20 Jul 2002 13:54:04 -0400, "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:
> > #macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
> > pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
> > );g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
> > y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
>
> what about:
>
> light_source{y#macro p(c)#if(c>1)#local l=mod(c,100);g(x-2*div(l,10)+8,y-2*
> mod(l,10)+8,0)*p(div(c,100))#end#end#local s=function{z*sqrt(pow(x,2)+pow(y
> ,2))}2}sphere{z*20#local g=function{.4*abs(sin(s(x,y,9)))*pow(1-min(1,s(x,y
> ,.3)),2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
or:
light_source{y#macro p(c)#if(c>1)#local l=mod(c,1E2);g(x-2*div(l,10)+8,y
-2*mod(l,10)+8,0)*p(div(c,1E2))#end#end 2}sphere{#include"functions.inc"
z*20#local g=function{.4*abs(sin(9*f_r(x,y,0)))*pow(1-min(1,.3*f_r(x,y,0
)),2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tor Olav Kristensen wrote:
>
> >
> > On 20 Jul 2002 13:54:04 -0400, "Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote:
> > > #macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
> > > pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
> > > );g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
> > > y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M
> >
> > what about:
> >
> > light_source{y#macro p(c)#if(c>1)#local l=mod(c,100);g(x-2*div(l,10)+8,y-2*
> > mod(l,10)+8,0)*p(div(c,100))#end#end#local s=function{z*sqrt(pow(x,2)+pow(y
> > ,2))}2}sphere{z*20#local g=function{.4*abs(sin(s(x,y,9)))*pow(1-min(1,s(x,y
> > ,.3)),2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
>
> or:
>
> light_source{y#macro p(c)#if(c>1)#local l=mod(c,1E2);g(x-2*div(l,10)+8,y
> -2*mod(l,10)+8,0)*p(div(c,1E2))#end#end 2}sphere{#include"functions.inc"
> z*20#local g=function{.4*abs(sin(9*f_r(x,y,0)))*pow(1-min(1,.3*f_r(x,y,0
> )),2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
I just RTFM and found that it could have 3 characters less:
light_source{y#macro p(c)#if(c>1)#local l=mod(c,1E2);g(x-2*div(l,10)+8,y
-2*mod(l,10)+8,0)*p(div(c,1E2))#end#end 2}sphere{#include"stdinc.inc"20*
z#local g=function{.4*abs(sin(9*f_r(x,y,0)))*pow(1-min(1,.3*f_r(x,y,0)),
2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Mon, 22 Jul 2002 22:37:08 +0200, Tor Olav Kristensen
<tor### [at] hotmailcom> wrote:
> light_source{y#macro p(c)#if(c>1)#local l=mod(c,1E2);g(x-2*div(l,10)+8,y
> -2*mod(l,10)+8,0)*p(div(c,1E2))#end#end 2}sphere{#include"stdinc.inc"20*
> z#local g=function{.4*abs(sin(9*f_r(x,y,0)))*pow(1-min(1,.3*f_r(x,y,0)),
> 2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
Personally I don't write sigs with #include but no reason to not simplify such
;-)
light_source{y#include"stdinc"2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(mod
(c,49),7)+8,y-2*mod(c,7)+8,22)*p((c-mod(c,49))/49)#end#end#local g=function
{abs(sin(9*f_r(x,y,0)))*pow(3-min(3,f_r(x,y,0)),2)/z+.9}9pigment{function{p
(2399498)p(3257797)p(5762298)1}}}//M
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>
> On Mon, 22 Jul 2002 22:37:08 +0200, Tor Olav Kristensen
> <tor### [at] hotmailcom> wrote:
> > light_source{y#macro p(c)#if(c>1)#local l=mod(c,1E2);g(x-2*div(l,10)+8,y
> > -2*mod(l,10)+8,0)*p(div(c,1E2))#end#end 2}sphere{#include"stdinc.inc"20*
> > z#local g=function{.4*abs(sin(9*f_r(x,y,0)))*pow(1-min(1,.3*f_r(x,y,0)),
> > 2)+.9}9pigment{function{p(26252423)p(36455644)p(66656463)1}}}//M
>
> Personally I don't write sigs with #include but no reason to not simplify such
> ;-)
I agree with you that sigs are better without includes, but since f_r() is
an internal function, I made an exception; because the only "legal" way to
call such internal functions is via the "functions.inc" file.
> light_source{y#include"stdinc"2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(mod
> (c,49),7)+8,y-2*mod(c,7)+8,22)*p((c-mod(c,49))/49)#end#end#local g=function
> {abs(sin(9*f_r(x,y,0)))*pow(3-min(3,f_r(x,y,0)),2)/z+.9}9pigment{function{p
> (2399498)p(3257797)p(5762298)1}}}//M
Hehe - I thought that you would come up with such a suggestion.
I noticed that the image from your code is not identical to M's original
image, but I think that it's close enough.
Now this code contains 7 character less:
light_source{y#include"stdinc"2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(
mod(c,49),7)+8,y-2*mod(c,7)+8,22)*p(div(c,49))#end#end#local g=function{
abs(sin(9*f_r(x,y,0)))*pow(3-min(3,f_r(x,y,0)),2)/z+.9}9pigment{function
{p(2399498)p(3257797)p(5762298)1}}}//M
- And I have a feeling that it can still be shortened some more ;)
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3D3D9D92.C5EB47FF@hotmail.com>,
Tor Olav Kristensen <tor### [at] hotmailcom> wrote:
> I agree with you that sigs are better without includes, but since f_r() is
> an internal function, I made an exception; because the only "legal" way to
> call such internal functions is via the "functions.inc" file.
math.inc also includes the functions.inc file, and has a shorter name.
Why not use the sqrt() function? sqrt(x*x+y*y) will be the same as
f_r(x,y,0), and won't need the #include.
light_source{y 2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(mod(c,49),7)+8,
y-2*mod(c,7)+8,22)*p(div(c,49))#end#end#local g=function{abs(sin(9*sqrt(
x*x+y*y)))*pow(3-min(3,sqrt(x*x+y*y)),2)/z+.9}9pigment{function{p(2399498
)p(3257797)p(5762298)1}}}//M
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christopher James Huff wrote:
>
> In article <3D3D9D92.C5EB47FF@hotmail.com>,
> Tor Olav Kristensen <tor### [at] hotmailcom> wrote:
>
> > I agree with you that sigs are better without includes, but since f_r() is
> > an internal function, I made an exception; because the only "legal" way to
> > call such internal functions is via the "functions.inc" file.
>
> math.inc also includes the functions.inc file, and has a shorter name.
> Why not use the sqrt() function? sqrt(x*x+y*y) will be the same as
> f_r(x,y,0), and won't need the #include.
>
> light_source{y 2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(mod(c,49),7)+8,
> y-2*mod(c,7)+8,22)*p(div(c,49))#end#end#local g=function{abs(sin(9*sqrt(
> x*x+y*y)))*pow(3-min(3,sqrt(x*x+y*y)),2)/z+.9}9pigment{function{p(2399498
> )p(3257797)p(5762298)1}}}//M
Hmmm... The sqrt(x*x+y*y) substitution was my first thought.
But then I fooled myself in some strange way into believing
that the f_r() solution would be the shortest solution.
(At some point in the "evolution" it really was.)
> light_source{y 2}sphere{20*z#macro p(c)#if(c>1)g(x-2*div(mod(c,49),7)+8,
> y-2*mod(c,7)+8,22)*p(div(c,49))#end#end#local g=function{abs(sin(9*sqrt(
> x*x+y*y)))*pow(3-min(3,sqrt(x*x+y*y)),2)/z+.9}9pigment{function{p(2399498
> )p(3257797)p(5762298)1}}}//M
I still feel that it could be shortened further...
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 23 Jul 2002 22:41:40 +0200, Tor Olav Kristensen
<tor### [at] hotmailcom> wrote:
> I still feel that it could be shortened further...
something like this ?
light_source{y#local g=function{abs(sin(9*sqrt(x*x+y*y)))*pow(3-min(3,sqrt(x
*x+y*y)),2)/z+.9}2}sphere{20*z#macro p(Y,C,X)#if(C)g(abs(x)-X,y-Y,22)*p(Y-2C
-1X)#end#end 9pigment{function{p(4,4,4)p(2,2,0)p(4,1,2)1}}}//M
increasing/decreasing 22 you can simple control visibility of this relief
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|