delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/30/22:00:36

From: "Ted Gress" <gress AT mbcomp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: I need to find the center of a triangle in 3D space, help!
Date: Fri, 30 Jan 1998 21:52:46 -0500
Organization: LebaNet
Lines: 16
Message-ID: <6au3is$6lk$1@newton.leba.net>
NNTP-Posting-Host: 207.77.85.92
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am creating my own graphics library that does alpha-blending,
anti-aliasing, tri-linear buffering, and all that stuff (software based)....

My only problem is I need to know how to rotate around the objects center,
so i need to know how to rotate around the center of a triangle!! Right now,
it is rotating around the origin and looks horrible.

Does anyone know how to find the center point of a triangle from the
coordinates of 3 vertices?? And does anybody know the formula (without
matrices! !yikes!) to rotate an object around a specific point? Like if i
wanted to rotate a triangle around point (2,2,1)??  [x,y,z]

Thanx for your help!!



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019