POV-Ray : Newsgroups : povray.binaries.images : Alienese Server Time
31 Jul 2024 08:19:38 EDT (-0400)
  Alienese (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Tek
Subject: Alienese
Date: 18 Sep 2010 14:14:39
Message: <4c95018f@news.povray.org>
I wanted some random meaningless alien letters for a space scene I've been 
working on, so I decided to make a pigment filled with random alien 
gibberish!

The letters are built out of segments, like the numbers on a calculator, but 
the segments can overlap. I use object pigments with a repeat warp and a 
cells pattern to randomly light up every possible combination of segments, 
in an infinitely large pigment.

Here's the code:

//--start
// Alienese - by Tek

#include "transforms.inc"

#declare AlienLetters = array[6];

// build it in boxes of 11x11, from 0,0 to 11,11 with 0-1 and 10-11 as space 
between letters
#declare AlienLetters[0] =
 union { box { <1,1>, <2,6,1> } box { 0, <1,4,1> Shear_Trans(x-y,y+x,z) 
translate <1,6> } box { <5,9>, <6,10,1> } scale <1,1,11>/11 };
#declare AlienLetters[1] =
 union { box { <9,1>, <10,6,1> } box { -x, <0,4,1> Shear_Trans(x+y,y-x,z) 
translate <10,6> } box { <5,9>, <6,10,1> } scale <1,1,11>/11 };
#declare AlienLetters[2] = box { 0,1 Shear_Trans(x-y,y+x,z) translate 
<4.5,5.5> scale <1,1,11>/11 };
#declare AlienLetters[3] =
 union { box { <1,1>, <6,2,1> } box { 0, <1,4,1> Shear_Trans(x-y,y+x,z) 
translate <5,2> } box { <9,5>, <10,6,1> } scale <1,1,11>/11 };
#declare AlienLetters[4] =
 union { box { <9,5>, <10,6,1> } box { -x, <0,4,1> Shear_Trans(x+y,y-x,z) 
translate <10,6> } box { <5,9>, <6,10,1> } scale <1,1,11>/11 };
#declare AlienLetters[5] =
 box { 0, <1,8,1> Shear_Trans(x-y,y+x,z) translate <1,2> scale 
<1,1,11>/11 };

#declare Alienese =
 pigment {
  // combine an on/off pattern for each of the cells making the characters
  // optimal version would test empty space first, then combinations of 
cells, then individual ones, but lazy approach is just test all using 
average and saturate that
  pigment_pattern {
   pigment_pattern {
    average
    pigment_map {
     // toggle each one randomly, by using 2x frequency with each letter 
part, so every combination appears in the colour map.
     // could instead get a nice effect by having a list of every valid 
combo and doing one big colour map on cells for that.
     #local i=0; #while ( i < dimension_size(AlienLetters,1) )
      [1 cells frequency pow(2,i) pigment_map { [.5 rgb 0][.5 object { 
AlienLetters[i] rgb 0, rgb 1 } warp { repeat x } warp { repeat y } warp { 
repeat z } ] } ]
     #local i=i+1; #end
    }
   }
   colour_map {
    [.5/dimension_size(AlienLetters,1) rgb 0]
    [.5/dimension_size(AlienLetters,1) rgb 1]
   }
  }
 }

//--end

Enjoy!

-- 
Tek
http://evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'alienese.jpg' (134 KB)

Preview of image 'alienese.jpg'
alienese.jpg


 

From: nemesis
Subject: Re: Alienese
Date: 18 Sep 2010 19:15:01
Message: <web.4c9546dfc11dc80d426d6e30@news.povray.org>
you know you're awesome, mr. big brain... :)


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Alienese
Date: 19 Sep 2010 11:34:36
Message: <4c962d8c@news.povray.org>
Tek wrote:

> I wanted some random meaningless alien letters for a space scene I've been 
> working on, so I decided to make a pigment filled with random alien 
> gibberish!

Looks neat and very elegant solution! The only problem I see
is that the perfect grid may be a bit distracting. I just played
with a derived pigment that uses different spacings for each
line although it is not really a proportional font:

#declare CELL_WIDTH = 10000;
#declare LINE_STEPS = 10;
#declare MAX_FACTOR = 0.5;

#declare AlieneseProportional = pigment
{
   cells translate -0.5*x scale <CELL_WIDTH,1,1>
   pigment_map
   {
     [0.0 Alienese scale <1.0/CELL_WIDTH,1,1>]
     #local LINE_STEP=1;
     #while (LINE_STEP < LINE_STEPS)
       [LINE_STEP/LINE_STEPS Alienese scale
        <(1.0+(LINE_STEP-1)*MAX_FACTOR/(LINE_STEPS-1))/CELL_WIDTH,1,1>]
       [LINE_STEP/LINE_STEPS Alienese scale
        <(1.0+(LINE_STEP)*MAX_FACTOR/(LINE_STEPS-1))/CELL_WIDTH,1,1>]
       #local LINE_STEP=LINE_STEP+1;
     #end
     [1.0 Alienese scale <(1.0+MAX_FACTOR)/CELL_WIDTH,1,1>]
   }
   warp {turbulence <0.2,0.0,0.0> lambda 1.0 octaves 1}
}

I added a slight bit of turbulence in x direction as well,
although that causes the spacing to vary at different y
positions within a line as well. To get rid of that I think one
would need to use turbulence with a tweaked noise function.
Using stronger turbulence can also give a nice
"handwritten alienese" effect.

One thing I completely didn't understand was the need to
reverse the cell scaling for the inner pigment. I would have
expected that scaling the cell pattern up would give me larger
cells but not affect the scaling of pigments in the pigment_map.
But leaving out the correction factor just gave me horizontal
streaks (3.6.1 and 3.7 beta 39).


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Alienese
Date: 19 Sep 2010 11:41:55
Message: <4c962f43@news.povray.org>
Forgot the image


Post a reply to this message


Attachments:
Download 'alienese_spacing.jpg' (96 KB)

Preview of image 'alienese_spacing.jpg'
alienese_spacing.jpg


 

From: Alain
Subject: Re: Alienese
Date: 19 Sep 2010 12:21:39
Message: <4c963893$1@news.povray.org>


> One thing I completely didn't understand was the need to
> reverse the cell scaling for the inner pigment. I would have
> expected that scaling the cell pattern up would give me larger
> cells but not affect the scaling of pigments in the pigment_map.
> But leaving out the correction factor just gave me horizontal
> streaks (3.6.1 and 3.7 beta 39).

When you scale a pigment or texture, you scale all of it, including any 
sub pattern or texture. The pigment_map is effectively part of the cells 
pattern.
You can think of scaling as similar to a magnifying glass. It don't 
discriminate between the various parts.



Alain


Post a reply to this message

From: Tek
Subject: Re: Alienese
Date: 19 Sep 2010 20:30:26
Message: <4c96ab22@news.povray.org>
"Alain" <aze### [at] qwertyorg> wrote in message 
news:4c963893$1@news.povray.org...

>
>> One thing I completely didn't understand was the need to
>> reverse the cell scaling for the inner pigment. I would have
>> expected that scaling the cell pattern up would give me larger
>> cells but not affect the scaling of pigments in the pigment_map.
>> But leaving out the correction factor just gave me horizontal
>> streaks (3.6.1 and 3.7 beta 39).
>
> When you scale a pigment or texture, you scale all of it, including any 
> sub pattern or texture. The pigment_map is effectively part of the cells 
> pattern.
> You can think of scaling as similar to a magnifying glass. It don't 
> discriminate between the various parts.

Exactly. You can avoid this using pigment_pattern, like so:

pigment_pattern { cells scale <CELL_WIDTH,1,1> } //prevent scale from 
affecting child pigments
translate -0.5*x // allow this to affect child pigments
pigment_map {
    [etc..


-- 
Tek
http://evilsuperbrain.com


Post a reply to this message

From: Tek
Subject: Re: Alienese
Date: 19 Sep 2010 20:48:57
Message: <4c96af79@news.povray.org>
"Christian Froeschlin" <chr### [at] chrfrde> wrote in message 
news:4c962d8c@news.povray.org...
>
> Looks neat and very elegant solution! The only problem I see
> is that the perfect grid may be a bit distracting. I just played
> with a derived pigment that uses different spacings for each
> line although it is not really a proportional font:

Cool, though for my purposes I don't need a wall of text so the pattern 
should never be obvious.

Though I did think about how to make each line be a random number of 
characters long...

...In fact I've given that a quick try, turns out to be pretty simple. 
Here's the code:

#local f_cells = function { pattern { cells } }

#macro AlieneseWrap( LineLength, Variation )
 function {
  select( LineLength - int(f_cells(x/LineLength,y,z)*Variation) - x, 0, 1 )
 }
 pigment_map {
  [0 rgb 0]
  [1 Alienese]
 }
#end

 pigment { AlieneseWrap( 25, 10 ) }

Obviously this can be adapted easily to have chinese style downwards writing 
instead of left-to-right. Dunno what the syntax is for this language :)

-- 
Tek
http://evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'temp.png' (95 KB)

Preview of image 'temp.png'
temp.png


 

From: Tek
Subject: Re: Alienese
Date: 19 Sep 2010 20:58:41
Message: <4c96b1c1@news.povray.org>
Extreme example!
AlieneseWrap( 60, 60 )

It looks like code, maybe I need to add some hierarchical indenting! 
(probably putting too much thought into this, should get on with the sci-fi 
picture I created it for!)

-- 
Tek
http://evilsuperbrain.com


"Tek" <tek### [at] evilsuperbraincom> wrote in message 
news:4c96af79@news.povray.org...
> "Christian Froeschlin" <chr### [at] chrfrde> wrote in message
> news:4c962d8c@news.povray.org...
>>
>> Looks neat and very elegant solution! The only problem I see
>> is that the perfect grid may be a bit distracting. I just played
>> with a derived pigment that uses different spacings for each
>> line although it is not really a proportional font:
>
> Cool, though for my purposes I don't need a wall of text so the pattern
> should never be obvious.
>
> Though I did think about how to make each line be a random number of
> characters long...
>
> ...In fact I've given that a quick try, turns out to be pretty simple.
> Here's the code:
>
> #local f_cells = function { pattern { cells } }
>
> #macro AlieneseWrap( LineLength, Variation )
> function {
>  select( LineLength - int(f_cells(x/LineLength,y,z)*Variation) - x, 0, 1 )
> }
> pigment_map {
>  [0 rgb 0]
>  [1 Alienese]
> }
> #end
>
> pigment { AlieneseWrap( 25, 10 ) }
>
> Obviously this can be adapted easily to have chinese style downwards 
> writing
> instead of left-to-right. Dunno what the syntax is for this language :)
>
> -- 
> Tek
> http://evilsuperbrain.com
>
>
>


Post a reply to this message


Attachments:
Download 'temp.png' (83 KB)

Preview of image 'temp.png'
temp.png


 

From: Thomas de Groot
Subject: Re: Alienese
Date: 20 Sep 2010 03:20:11
Message: <4c970b2b$1@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> schreef in bericht 
news:4c96b1c1@news.povray.org...
> Extreme example!
> AlieneseWrap( 60, 60 )
>
> It looks like code, maybe I need to add some hierarchical indenting! 
> (probably putting too much thought into this, should get on with the 
> sci-fi picture I created it for!)
>

Sure! But together with Christian, you have now been at the sart of a whole 
new body of literature!  ;-)

Thanks!!

Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Alienese
Date: 20 Sep 2010 16:30:00
Message: <web.4c97c40cc11dc80196b08580@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote:
> Extreme example!
> AlieneseWrap( 60, 60 )

This is very cool--looks like the 'matrix' code at he beginning of the MATRIX
films.

I shall have fun experimenting with these ideas; I'm still looking over your
code to fully understand it.  Nice work!  (I'm imagining the letters being used
to create a height_field--then you'd have a 'Rosetta Stone' generator.) I'm
guessing that the letters can be made to look less 'aligned' somehow--as if
hand-drawn (or hand-chisled!) by a non-artist.

Ken


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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