Skip to content

Latest commit

 

History

History
283 lines (224 loc) · 9.1 KB

README.md

File metadata and controls

283 lines (224 loc) · 9.1 KB


3Dengine
My3DEngine

2D LSystems


l2d

Bracket-Rule


l2d

Stochaic Replacement Rule


stochaic stochaic stochaic
  • Put %x behind a rule
    • x is a double with "." as decimal point (always type a decimal point)
  • If you don't use %x, then the probability of this rule is automatically 100%
  • The percentages get added in order
  • What if the sum is under 100:
    • The resting percentage get filled with a "do not replace" rule
    • Eg: Rules: F -> "F+F" %50, G->"F-(F+F)" | Now there is a 50% chance F->"F"
  • What if the sum is above 100:
    • This wil not cause an error, it will only result in unexpected outcomes
    • Eg: Rules: F -> "F+F" %70, F->"F-F" %50 | The chance for "F-F" is actually 30% not 50%
    • Eg: Rules: F -> "F+F" %10, F->"F-F" | The chance fo "F-F" is actually 90%
    • Eg: Rules: F-> "F+F", F->"F-F" %70 | The chance for "F-F" is actually 0% not 70%
stochaic

3D Linedrawings


3dl

3D Objects


torus bear

Implemented Objects:

  • Object3D::Object3DFactory::createLineDrawing(const ini::Section &objsec);
  • Object3D::Object3DFactory::createTetrahedron();
  • Object3D::Object3DFactory::createCube();
  • Object3D::Object3DFactory::createIcosahedron();
  • Object3D::Object3DFactory::createDodecahedron();
  • Object3D::Object3DFactory::createOctahedron();
  • Object3D::Object3DFactory::createCylinder(const int &n, const double &h);
  • Object3D::Object3DFactory::createCone(const int &n, const double &h);
  • Object3D::Object3DFactory::createSphere(const int &n);
  • Object3D::Object3DFactory::createTorus(const double &r, const double &R, const int &n, const int &m);
  • Object3D::Object3DFactory::loadObj(const std::string &filename);
    • Loads in an object from any .obj file compatible with the obj Parser (examples provided in exampleFiles Folder)

3D LSystems


lsys

Zbuffering


ZBuffering Lines


zbWf

ZBuffering Triangles


zbTg

3D Fractals


f3d f3d2

Implemented Fractal Objects:

  • Object3D::Object3DFactory::createFractalCube(const double &fractalScale, const int &nrIterations);
  • Object3D::Object3DFactory::createFractalDodecahedron(const double &fractalScale, const int &nrIterations);
  • Object3D::Object3DFactory::createFractalIcosahedron(const double &fractalScale, const int &nrIterations);
  • Object3D::Object3DFactory::createFractalOctahedron(const double &fractalScale, const int &nrIterations);
  • Object3D::Object3DFactory::createFractalTetrahedron(const double &fractalScale, const int &nrIterations);

BuckyBall


bucky buckyfrac
  • Object3D::Object3DFactory::createBuckyBall();
  • Object3D::Object3DFactory::createFractalBuckyBall(const double &fractalScale, const int &nrIterations);

Mengersponge


meng
  • Object3D::Object3DFactory::createMenger(const int &nrIterations);

Lighting


light1

Ambient Light


ambient

Diffuse Light


diffuse

Infinity Light

This light only has a pointing direction.


infl

Point Light

This light onlyl has a location.

It could be a spotlight, if the spotangle != -1.


pointL

SpotLight

spotl

Specular Light


spec1 spec2

Shadowing


shadow1 shadow2

License

MIT


GitHub @ArneDePeuter  ·  Mail arne.depeuter@uantwerpen.be