Skip to content

Commit

Permalink
[Feat] (Docs) : docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed May 11, 2023
1 parent d3cd2a2 commit ac0a919
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 0 deletions.
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ les primitives sont:
- [Cylindre-Limité](#Cylindre-Limité)
- [Torus](#Torus)
- [Triangle](#Triangle)
- [Obj](#Obj)
les materiaux sont:
- [PlainMaterial](#PlainMaterial)
Expand Down Expand Up @@ -1393,6 +1394,95 @@ lights :

</details>

## Obj

![image](/documentation/obj.png)

<details>*
<summary>afficher ...</summary>

```python
# obj.yaax

# Configuration of the camera
cameras:
{
Camera: (
{
size = {x: 500; y = 500;};
transform = {
position = {x = 0.0; y = -30.0; z = 0.0;};
scale = {x = 0.0; y = 0.0; z = 0.0;};
rotation = {x = 0.0; y = 0.0; z = 0.0;};
};
focal = 200.0;
maxThreads = -1;
filters = {
SSAAx4: (
{
maxThreads = -1;
}
)
}
}
);
};

# Primitives in the scene
primitives :
{
# List of OBJ
Obj = (
{
filePath = "./tests/obj/monkey.obj";
transform = {
position = {x = 0.0; y = 0.0; z = 0.0;};
scale = {x = 1.0; y = 1.0; z = 1.0;};
rotation = {x = 0.0; y = 0.0; z = 0.0;};
}
material = {
type = "PlainMaterial";
shininess = 10.0;
ambient = {x = 1.0; y = 1.0; z = 1.0;};
diffuse = {x = 1.0; y = 1.0; z = 1.0;};
specular = {x = 1.0; y = 1.0; z = 1.0;};
color = {r = 68.0; g = 171.0; b = 128.0; a = 255.0;};
};
}
);
};

# Light configuration
lights :
{
PointLight = (
{
transform = {
position = {x = 0.0; y = -10.0; z = 0.0;};
scale = {x = 500.0; y = 1.0; z = 0.0;};
rotation = {x = 60.0; y = 20.0; z = -10.0;};
};
color = {r = 255.0; g = 126.0; b = 255.0; a = 255.0;};
power = 2.0;
radius = 500.0;
}
);
AmbientLight = (
{
transform = {
position = {x = 150.0; y = 0.0; z = 100.0;};
scale = {x = 1.0; y = 0.0; z = 0.0;};
rotation = {x = 60.0; y = 20.0; z = -10.0;};
};
color = {r = 50.0; g = 50.0; b = 50.0; a = 255.0;};
power = 1.0;
}
);
};
```

</details>

## PlainMaterial

![image](/documentation/plainmaterial1-basic.png)
Expand Down
Binary file added documentation/obj.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions tests/documentation/obj.yaax
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Configuration of the camera
cameras:
{
Camera: (
{
size = {x: 500; y = 500;};
transform = {
position = {x = 0.0; y = -30.0; z = 0.0;};
scale = {x = 0.0; y = 0.0; z = 0.0;};
rotation = {x = 0.0; y = 0.0; z = 0.0;};
};
focal = 200.0;
maxThreads = -1;
filters = {
SSAAx4: (
{
maxThreads = -1;
}
)
}
}
);
};

# Primitives in the scene
primitives :
{
# List of OBJ
Obj = (
{
filePath = "./tests/obj/monkey.obj";
transform = {
position = {x = 0.0; y = 0.0; z = 0.0;};
scale = {x = 1.0; y = 1.0; z = 1.0;};
rotation = {x = 0.0; y = 0.0; z = 0.0;};
}
material = {
type = "PlainMaterial";
shininess = 10.0;
ambient = {x = 1.0; y = 1.0; z = 1.0;};
diffuse = {x = 1.0; y = 1.0; z = 1.0;};
specular = {x = 1.0; y = 1.0; z = 1.0;};
color = {r = 68.0; g = 171.0; b = 128.0; a = 255.0;};
};
}
);
};

# Light configuration
lights :
{
PointLight = (
{
transform = {
position = {x = 0.0; y = -10.0; z = 0.0;};
scale = {x = 500.0; y = 1.0; z = 0.0;};
rotation = {x = 60.0; y = 20.0; z = -10.0;};
};
color = {r = 255.0; g = 126.0; b = 255.0; a = 255.0;};
power = 2.0;
radius = 500.0;
}
);
AmbientLight = (
{
transform = {
position = {x = 150.0; y = 0.0; z = 100.0;};
scale = {x = 1.0; y = 0.0; z = 0.0;};
rotation = {x = 60.0; y = 20.0; z = -10.0;};
};
color = {r = 50.0; g = 50.0; b = 50.0; a = 255.0;};
power = 1.0;
}
);
};

0 comments on commit ac0a919

Please sign in to comment.