# Transformation

All **Objects** in **Incari** exist in *3D* space, and have a set of **Attributes** to define their **Transformation** data. **Transformation** is divided into three **Vector3** type **Attributes**: `Position`, `Rotation`, and `Scale`.

This page offers overview descriptions of the three **Transformation** **Attributes** ([`Position`](#position), [`Rotation`](#rotation), [`Scale`](#scale)) and of one special case, that of [**Groups**](#groups).

Moreover, there are two modes for performing **Transformations**:

* [Global](https://docs.incari.com/incari-studio/2023.1/objects-and-types/attributes/common-attributes/transformation/global): **Objects** are transformed with respect to the **Scene** axes.
* [Local](https://docs.incari.com/incari-studio/2023.1/objects-and-types/attributes/common-attributes/transformation/local): Each **Object** is transformed with respect to its own axes.

## Position

`Position` is defined by three values, representing each of the three axes of a three dimensional Cartesian coordinate system.

In most *2D* graphics applications, you will typically see a coordinate system with the origin (0,0) at the top-left corner of a document, and the X value increasing from left-to-right and the Y value increasing from top-to-bottom.

In **Incari**, coordinates are in 3D Euclidean space, with the origin (0, 0, 0) at the center, and the `x` value increasing from center-to-right, the `y` value increasing from center-to-top and the `z` value increasing from center-to-front.

Any point in space can be determined by these `x`, `y`, and `z` values.

![](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-9f82aad30d58c3b3927549a209ee1132e93ef4f5%2Fcoordinates%20\(1\).png?alt=media)

## Rotation

The `Rotation` **Attribute** represents the Euler angle of rotation of an **Object** along each of the rotation axes. An **Object** can be rotated in either **Local** or **Global space**. In **Local space**, any adjustments will be made along its *own* axes, not the axes of the **Scene** itself. On the other hand, rotations in **Global space** are performed with respect to the **Scene** axes.

Axes can be thought of as being like three skewers going through the **Object** and intersecting at the **Object's** [**Pivot Point**](https://github.com/cgi-studio-gmbh/incari-doc/blob/2023.1/objects-and-types/attributes/common-attributes/rotation-pivot.md).

For more detail, see:

* [**Global rotation**](https://docs.incari.com/incari-studio/2023.1/objects-and-types/attributes/common-attributes/global#rotation)
* [**Local rotation**](https://docs.incari.com/incari-studio/2023.1/objects-and-types/attributes/common-attributes/local#rotation)

![](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-c01088964176017193677c8f6577a1f89c19b2b8%2Frotation.gif?alt=media)

## Scale

`Scale` multiplies the size of an **Object** along its axes, relative to its **Origin**. By default, `Scale` is set to `x=1`, `y=1`, `z=1`, meaning that it is at 100% of its size on all axes.

![](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-c7587ab830a46448de4e8a1401f27e5621c8e5f1%2Ftransformationmainimage1.gif?alt=media)

## Groups

There is one special case that is worth noting, that of **Objects** that are part of a **Group**. In this case, the `Position` and `Rotation` **Attributes** of the **Objects** are relative to the `Position` and `Rotation` of the **Group**, respectively.

For this to be clearer, let us see two examples, one for the `Position` **Attribute** and one for the `Rotation` one.

Consider a **Group** containing one **Object**, a **Cube**. Setting the `Position` of the **Group** to `x=100` and the `Position` of the **Cube** to `x=100` will result in the **Cube** being located at `x=200` in the **Scene** space.

For an illustration of this, see the following example, in which there are two **Cubes**: one with `Position` `x=100` in a **Group** with `Position` `x=100` and another one that is not part of a **Group** and has `Position` `x=200`. For visualization purposes, the two **Cubes** have been set at different heights along the Y axis.

![](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-ed890e896bc748c2360dabbcc56559078ae9eb4a%2Ftransformationmainimage2.gif?alt=media)

The same applies to rotations. Consider again a **Group** containing one **Object**, a **Cube**. Setting the `Rotation` of the **Group** to `x=30` and the `Rotation` of the **Cube** to `x=30` will result in the **Cube** being rotated 60 degrees with respect to the **Scene** coordinate system.

For an illustration of this, see the following example, in which there are two **Cubes**: one with `Rotation` `x=30` in a **Group** with `Rotation` `x=30` and another one that is not part of a **Group** and has its `Rotation` set to `x=60`. For visualization purposes, the two **Cubes** have been set at different heights along the Y axis.

![](https://2628349686-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwnv17cpjDin2deSlOz0z%2Fuploads%2Fgit-blob-ac30a17a183568419c2a26633e3d80e48d2b72c1%2Ftransformationmainimage3.gif?alt=media)
