Skip to content

spinning all kinds of 3-dimensional objects in terminal.

Notifications You must be signed in to change notification settings

JiseungHong/donuts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

donuts

spinning all kinds of 3-dimensional objects in terminal. Any comments, Issues, Pull Requests are always welcome.

donuts.c

All descriptions are commented in donuts.c.

gcc -o donut donut.c

./donut

Then, experimentally manipulate the terminal size.

Reference: https://www.a1k0n.net/2011/07/20/donut-math.html

sphere.c

gcc -o sphere sphere.c

./sphere

All except following features are same as the donut.

  1. I made a sphere of radius R from the point (RS, RS, 0). Refer to sphere.c for variable descriptions.
  2. Then I rotated the sphere about x-axis and z-axis.
  3. Each coordinate (x, y, z) is obtained by the parametric equation of sphere * parallel translation matrix * rotation matrix.

donut

About

spinning all kinds of 3-dimensional objects in terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages