You are browsing as a guest. Sign up (or log in) to start making projects!

simple triangle renderer

  • 1 Devlogs
  • 3 Total hours

a basic triangle renderer in p5.js (I know p5 has inbuilt 3d rendering, but I wanted to make a renderer). The renderer uses a frustum and point projection method, but instead of having a z-buffer for every pixel to display the correct colour when two triangles overlap, the area of the screen covered by each triangle is stored, and reduced using an ear-clipping algorithm if another triangle partly covers it. I had been working on this project for a while before joining this hackclub event.

Open comments for this post

3h 2m 35s logged

finished and begun testing the function screentri.uncoveredSTPoints, which takes two 2d triangles (assuming the first is over the second) and returns the area(s) of the second one which aren’t covered by the first one as lists of vertices.

0
0
20

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…