DEMO2

Questo esempio realizza strutture ad albero utilizzando come immagine di base il nome stesso del software!

Le singole lettere sono scritte come una combinazione di pixel della libreria i_pix.cfdg

import i_pix.cfdg 

startshape CFDG 

shape CFDG 
{ 
    C_5by5 [ x -0.55  y +0.55 ] 
    F_5by5 [ x +0.55  y +0.55 ] 
    D_5by5 [ x -0.55  y -0.55 ] 
    G_5by5 [ x +0.55  y -0.55 ] 
}

Albero con angolo di 90° tra i rami (45° e -45°)

import i_pix.cfdg

startshape point

shape point
{
    C_5by5 [ x -0.55  y  0.55 ]
    F_5by5 [ x  0.55  y  0.55 ]
    D_5by5 [ x -0.55  y -0.55 ]
    G_5by5 [ x  0.55  y -0.55 ]

    point  [ x -1.4   y 1.4  rotate  45  size 0.6 ]
    point  [ x  1.4   y 1.4  rotate -45  size 0.6 ]
}

Due alberi contrapposti

import i_pix.cfdg

startshape thingy

shape thingy
{
    point [            ]
    point [ rotate 180 ]
}

shape point
{
    C_5by5 [ x -0.55  y +0.55 ]
    F_5by5 [ x +0.55  y +0.55 ]
    D_5by5 [ x -0.55  y -0.55 ]
    G_5by5 [ x +0.55  y -0.55 ]

    point  [ x -1.4   y +1.4  rotate +45  size 0.6 ]
    point  [ x +1.4   y +1.4  rotate -45  size 0.6 ]
}

Immagine e codice originale

import i_pix.cfdg

startshape thingy

shape thingy
{
    point []
    point [ y -1  rotate 180 ]
}

shape point
{
    C_5by5 [                ]
    F_5by5 [ x +1.2         ]
    D_5by5 [         y -1.2 ]
    G_5by5 [ x +1.2  y -1.2 ]
    point  [ x -2.5  y +2.0  rotate +20  size 0.6 ]
    point  [ x +2.5  y +2.0  rotate -20  size 0.6 ]
}

Lascia un commento