CREATING WALLS

Like we said, you will create SGAG galleries using blocks.

SGAG is very simple: there are only 9 blocks. We will learn how to use each one of them here at these lessons.

Lets go first to talk about the block used for the creation of walls. Its name is (oops!): wall.

For the creation of a wall inside a SGAG space you will "declare" the "formula" of an object of the type wall at the SGAG Template.

It's a little confuse? Lets go to see an example.

The "formula" for a wall is:

wall(width,height,depth,positionX,positionY,positionZ,rotationY,\'Color\')

You need to define the values of the inclined variables.

An SGAG block allways has: a positional point and a positional axis.Look this figure::

The position of a block in the SGAG space is defined by the position of its positional point.

And a block can rotate around its positional axis.

Imagine that we like to create the wall of the figure in the position: 2000, 0, -1000. And having a rotation of 45 degrees.

First of all you need to know that we don't use degrees, we use radians. The equivalence is:

It's allways a good idea to use the blueprint having the Grid, we have seeing in the previous lesson.

For the creation of this wall, we need to declare at the SGAG Template:

...
////////////////////////////////////////////////
////AREA FOR INSTALLERS & CONSTRUCTORS & WIZARDS
////////////////////////////////////////////////
'DEFAULTGALLERY="no";'+
//Change to "no" if you are defining your gallery
'GRID="yes";'+
////////////////OBJECTS HERE:
'BLOCK1="wall(600,300,50,2000,0,-1000,0.785,\'Pink\')";'+ 
 
///////////////////////////////////////////////////
////////END OF SGAG SCRIPT AREA
//////////////////////////////////////////////////
...

Pay attention that we need to write the complete declaration having the sequencial number of the block and all the signals (apostrophes, slashes, signal of "plus" at the end etc.). If we have 2 walls, the second will be BLOCK2. And so on.

Try to understand what we have "declared": the first three parameters are the dimensions. The next three are the position. And the next is the rotation in radians. The color will be Pink. You find the names of all the colors available, at:

The exercice of this lesson is to do something similar:

Exercice 1: Create, inside an SGAG Gallery, a Red wall, at the position 2000,-0,-1000 and the dimesions: 50,300,2000 and the rotation 45 degrees. Pay attention that here the width is not the bigger dimention!!! But the angle is allways related to the width...

Try to do it now and before to go to the next lesson, look the result here.

IMPORTANT TIP: A block "wall" is a paralelogram. Doesn't need to be used only to do walls. You can create a cube, by example. But you CAN NOT create objects to the avatar "walk over", It doesn't work well. The avatar only walks well over one of the two types of blocks we will see soon: tetrabases and hexabases.

OBSERVATIONS: The grid is not very precise but this is not important... You can "fly" ("gravity" disabled) to see better the results.


PREVIOUS NEXT