Computer Graphics from Scratch by Gabriel Gambetta
Author:Gabriel Gambetta [Gabriel Gambetta]
Language: eng
Format: epub, pdf
Publisher: No Starch Press
Published: 2021-05-18T00:00:00+00:00
Projecting Our First 3D Object
This means we can go ahead and draw our first 3D object: a cube. We define the coordinates of its 8 vertices, and we draw line segments between the projections of the 12 pairs of vertices that make the edges of the cube, as seen in Listing 9-1.
ViewportToCanvas(x, y) {
return (x * Cw/Vw, y * Ch/Vh);
}
ProjectVertex(v) {
return ViewportToCanvas(v.x * d / v.z, v.y * d / v.z)
}
// The four "front" vertices
vAf = [-1, 1, 1]
vBf = [ 1, 1, 1]
vCf = [ 1, -1, 1]
vDf = [-1, -1, 1]
Download
Computer Graphics from Scratch by Gabriel Gambetta.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Windows Terminal Tips, Tricks, and Productivity Hacks by Will Fuqua(1378)
Augmented Reality with Unity AR Foundation by Jonathan Linowes(1157)
Sketching User Experiences by Buxton Bill(582)
Object-Role Modeling Fundamentals: A Practical Guide to Data Modeling with ORM by Terry Halpin(555)
Beginning AutoCAD 2020 Exercise Workbook by Cheryl R. Shrock(533)
You Donât Know JS: Up & Going by Kyle Simpson(514)
Adobe InDesign for Absolute Beginner: Tips and Techniques to Creating Professional Books and Magazines for Online and Desktop Publishing using InDesign by Scott Walter & Scott Walter(455)
SketchUp For Dummies by Bill Fane & Mark Harrison & Josh Reilly(447)
AI 2041: Ten Visions for Our Future by Kai-Fu Lee & Chen Qiufan(447)
Windows 10: The Missing Manual by Pogue David(440)
100 Principles of Game Design by unknow(437)
Advanced Game Design by Michael Sellers(421)
The Rainbow Stack: A Casual Guide to UX Design by Jawara Joseph(407)
Research Methods in Human-Computer Interaction by unknow(406)
Mastering InDesign Templates by Murphy Monica & Knorr Mancini Margot(404)
Hands-On Data Visualization by Jack Dougherty(400)
Photoshop Elements 12 All-in-One For Dummies by Barbara Obermeier & Ted Padova(398)
Connected, Intelligent, Automated: The Definitive Guide to Digital Transformation and Quality 4.0 by Radziwill N. M(379)
TensorFlow 2.0 Computer Vision Cookbook by Jesus Martinez(363)