Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

geodesic geometry

R. Buckminster Fuller method 1 spheres and domes from icosahedra or octahedra

try it out

make then make run

picture

files

  • geodesic.h + .c data
  • OpenGL/mesh.h + .c rendering, and more mesh data for rendering

geodesic.h / .c

types

 // sphere
geodesicSphere icosahedronSphere(int v);
geodesicSphere octahedronSphere(int v);
geodesicSphere tetrahedronSphere(int v);
 // dome
geodesicDome icosahedronDome(int v, float crop);
geodesicDome octahedronDome(int v, float crop);
geodesicDome tetrahedronDome(int v, float crop);

usage

geodesicSphere icosphere = icosahedron(3)  // 3v icosahedron
geodesicDome dome = icosahedronDome(3, 5/9);  // 3v 5/9 dome

now you have access to points, lines, face, as well as normals data. For domes, there's also more complicated data involved in slicing the sphere into a dome including number of slice meridians, triangle count on each row, relationship of face to row number.

mesh.h / .c

initialize

geodesicMeshTriangles mesh = makeMeshTriangles(&icosphere, .75){
geodesicMeshNormals normals = makeMeshNormals(&icosphere);

draw

// draw geodesic objects
drawGeodesicTriangles(&icosphere);
drawDomeMeshTriangles(&dome, &domeTriangleMesh);

// draw mesh objects
drawGeodesicExtrudedTriangles(&mesh);
drawGeodesicVertexNormalLines(&normals);
drawGeodesicFaceNormalLines(&normals);

memory

delete geometry when you are done

deleteGeodesicSphere(&geodesic);
deleteGeodesicDome(&dome);

deleteMeshNormals(&normals);
deleteMeshTriangles(&mesh);

picture

About

geodesic geometry library in C

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.