Skip to content

anshumanjadiya1102/DonutJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java License Platform Made with Swing Stars

🍩 Java 3D Spinning Donut

A fun project that renders a 3D spinning donut in Java using Swing and simple 3D math.
Inspired by the classic ASCII donut, but rendered with smooth graphics and shading.


⚡ Features

  • 3D torus rendered with Java2D
  • Real-time rotation on X, Y, Z axes
  • Simple perspective projection
  • Basic lighting & shading
  • Smooth 60 FPS animation

🎥 Demo

Here’s the donut in action:

Spinning Donut


🚀 How to Run

  1. Clone this repository:
  git clone https://github.com/anshumanjadiya1102/DonutJava.git
  cd DonutJava
  1. Compile
javac SwingDonut.java
  1. Run
java SwingDonut

A window will open with the spinning donut 🍩.


📸 Creating a GIF

If you want to capture your own demo:

  • Run the program

  • Use ShareX (Windows) or Peek/Kap (Linux/Mac)

  • Record the window as GIF and drop it into the repo

🛠️ Tech

  • Java 8+

  • Swing for GUI rendering

  • Basic 3D math (rotation matrices + perspective)

📜 License

Apache License — feel free to use, modify, and share.

About

A donut made with math and logic using Java

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages