Skip to content

Pouya-Hezaveh/Tree-Drawer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tree-Drawer

This is a small art coding project.

A Java code that draws a tree using a "Recursive Function" and "StdDraw.java Library".
This tree is very beautiful because almost all the ratios are obtained by the "Golden Ratio":

Paradise-Tree

How to use

You have to enter the desired number of branches in the console.

(It is recommended that a number be greater than 1 and less than 10; for example, in the image above, the input is 6)
While running the main function in the main.java file, the canvas window will be displayed. The canvas window will be displayed when the function StdDraw.setCanvasSize() runs.

Sources:

1- StdDraw.java file of Standard Library: https://introcs.cs.princeton.edu/java/stdlib/StdDraw.java

About

A Java project that draws a tree using a "Recursive Function" and "StdDraw.java Library".

Resources

License

Stars

Watchers

Forks

Languages