Skip to content

Using various algorithms to draw different shapes using only pixels

Notifications You must be signed in to change notification settings

leonben2892/ComputerGraphicsEX1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Graphics

Implementing functions to draw:

  • Lines (Using Bresenham algorithm)
  • Circles (Using Bresenham algorithm)
  • Bezier Curves using the following steps:
    1. Receiving 4 points.

    2. Create 2 seperate vectors: first vector is from the points X's and second vector is from the points Y's.

    3. Multiply the vectors separately in bezier matrix to calculate a,b,c,d equation constants.

    4. Calculate a new point on the curve using the following polynomials: Polynomials

         t values is between 0 and 1 (Taking smaller steps equals smoother bezier curve)
      
    5. Draw a line between the previous point and the new point.

    6. Increment t by the step size.

      Repeate steps iv ~ vi until t >= 1
      

SimplePaint

About

Using various algorithms to draw different shapes using only pixels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages