Dr Neil Dodgson, University of Cambridge Computer Laboratory
Part II course, 1998

# 2C) Converting primitives to polygons

When using PSC any primitive shape, be it sphere, torus or sweep, must be converted to polygons in order to be drawn.

A swept surface may be easily converted to polygons by converting the outline of the 2D cross section to a polygon, and converting the sweep path to connected set of line segments. Moving the polygon to each vertex of the set of line segments, and connecting vertices accordingly, will produced a polygon mesh which approximates the swept surface.

 Exercises Show how to convert a cylinder into a polygon mesh. What changes do you have to make if the mesh may contain only triangles? Show how to convert a torus into a polygon mesh. [1998/7/12] Show how to convert the swept object from Lecture 2B Exercise 1 into polygons. What extra work would you need to do if you had to convert it into triangles? Show how to convert a sphere into a triangle mesh. How can you get the most even distributiuon of triangle vertices across the sphere?

Neil Dodgson | Advanced Graphics | Computer Laboratory

Source file: l2c.html
Page last updated on Mon Sep 7 12:47:51 BST 1998