Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!motcsd!lance From: lance@motcsd.csd.mot.com (lance.norskog) Newsgroups: comp.graphics Subject: Re: Wanted, 3d matrix multiplication source code for IBM PC Message-ID: <3667@motcsd.csd.mot.com> Date: 16 Apr 91 22:33:10 GMT References: <40747@cup.portal.com> Organization: Motorola CSD, Cupertino CA Lines: 25 In article <40747@cup.portal.com> Bobster@cup.portal.com (Robert Jules Shaughnessy) writes: > > I am looking for assembler source code for MS-DOS/PC Clone, that >will perform 3D matrix multiplication X,Y,Z rotation. If you have some > [rest deleted] >Bobby Shaughnessy > Well, you could toss your Intel 8x87 and buy an IIT 8x87 clone. It has a very spiffy 4x4 matmul routine which is much faster if you're processing many points in a row through one matrix. It has special extra registers for storing the matrix. Another method: push the 3 numbers of your input point into the 87 stack. Then, to process the first two lines of the matrix, copy a register in the stack to the top of the stack (there's an instruction for this). The point here is to avoid loading the same point into the chip 3 times. If you're matmul-ing a point, then using it, then throwing it away, you can use fixed-point arithmetic or the integer hacks posted here before. But remember, if you're saving the processed point around and using it a lot, you want it to be accurate. Lance