2022 Developer Survey is open! Take survey.

New answers tagged

3 votes

Rendering primitive 2D shapes

Your use of underscores to prefix methods is not a good idea since they are reserved. The lack of comments through out the code mean that it is more difficult to read than it should be. You should ...
user avatar
  • 1,437
1 vote
Accepted

Generate vertices and normals for a flat shaded cylinder

Some suggestions: Separate generating the mesh from printing the mesh. i.e. return a Mesh class from the generator function and write a separate ...
user avatar
0 votes

Generate vertices and normals for a flat shaded cylinder

I won't dive into the algorithm; it looks fine to me at a glance, but I'm not familiar with geometry. I made a functional version of your code. You won't go far without functional programming in Rust; ...
user avatar

Top 50 recent answers are included