delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/14/05:50:07

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: cross_product() - Allegro
Date: 14 May 1997 05:01:41 GMT
Organization: The National Capital FreeNet
Lines: 14
Message-ID: <5lbgvl$qih@freenet-news.carleton.ca>
References: <Pine DOT GSO DOT 3 DOT 96 DOT 970513154002 DOT 12358A-100000 AT linknet DOT kitsap DOT lib DOT wa DOT us>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet5.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

KaRNaGE (dlydiard AT linknet DOT kitsap DOT lib DOT wa DOT us) writes:
> i was wondering how i could use cross_product() to get the normal of a
> vector (x, y, z)...and the normal of a face (triangle)...thankz...

Given three points of the triangle, make two vectors, of the form p1-p2
and p1-p3, cross product them, the new vector is at right angles and hence
a normal.

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


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