Wednesday, April 18, 2018

Fractal Tree in C++ using OpenGL

Following snapshots were obtained in C++ using OpenGL.
I rotated the scene and got different views of the tree.
Snapshots:



Here is the source.

Dynamic Bezier Curve in Java using JOGL

I have named this project as Dynamic Bezier Curve. It uses Evaluators of Bezier curves.

Two bezier curves are joined at the intersection point. The snake winds its way through the 3D path at random. So control points to draw the bezier curve are chosen randomly. These control points are created inside a cube using random number generation.

There are at-least 4 control points needed to draw one Bezier curve.
Two such control point arrays are used here.
They are arranged such that the last point of the first curve and the first point of the second curve are same. Not only that second last and last point of the first curve and first and second point of the second curve are lying on the same line. This is done to ensure continuity and smoothness at the joining point.

Here is a video of the output: https://youtu.be/zmLIoLXHiV8


Here is the source.