Proposed Addition: A vector/matrix math library.

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Proposed Addition: A vector/matrix math library.

Post by ooPo »

Since people tend to get a bit miffed when stuff is added to ps2sdk without discussion, here it is. :)

I want to add a simple, example math library which does your basic 3d functions. Create a few vectors, multiply a matrix, etc. Basically what I already have at http://www.oopo.net/consoledev/files/math3d-1.0.0.tgz. The main idea though is to have it running in vu0 macro code.

Before people start saying stuff like this needs to be in a separate library I'd like to also ask what people would like to see ps2sdk become. Personally, I view it as the starting point of getting into ps2dev and should be filled with example code and libraries that are enough to teach you the basics. Things like the typical 'hello world' program are covered, but what about putting a simple primitive on the screen, or dipping your toe into vu coding?

I think a math library like this is a great way to introduce vu coding to someone who is already familiar with basic 3d concepts.
User avatar
modman
Posts: 31
Joined: Sat Feb 12, 2005 7:09 am
Location: Philadelphia, PA
Contact:

Post by modman »

ooPo:

sounds like a great addition to me.

this might be bringing the subject matter a bit off topic but i think anyone jumping into 3D code without understanding the math first is in for an uphill battle... if anyone out there is looking for a primer:

http://www.flipcode.com/articles/index.shtml

i'd say start here:

http://www.flipcode.com/articles/gprimer1_issue10.shtml

having the 3d library around will definitely help those not willing to write all of the functions themselves
I'd like to also ask what people would like to see ps2sdk become.
well i'd have to say that including more utils in the sdk would be helpfull... and more examples are always welcome... other than that GREAT JOB! :)
SCPH-50001/N
HD SCPH-20401 U
Eyetoy SLEH-00031
Network Adaptor SCPH-10281
Logitech Z680 via FIber w00t!
Sony Wega TV + USB Keyboard
http://staff.philau.edu/barberej/
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Eh eh I think, again, it's a worth & good addition :D

Some VU0/COP2 mathematicals functions and 3D operations (matrix, vectors, normalization,...) are already available in different projects, PbDemoLib from emoon is a first choice repository :D.

So before macrocoding, maybe gathering things could be a good start too ?

By the way, a friend is working on a similar project...so we will have plenty of things to aggregate :D
- TiTAN Art Division -
http://www.titandemo.org
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Added. Will convert to vu macro code later. Someone should test PAL support in the sample program.

Enjoy!
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

Hum very nice to have added this sample which uses you dma+graph+math3D lib in one piece :D

I'll test it on my PAL ps2 and I'll give you feedback :D

Simple [organization] question, wouldn't it be better to :
- put this sample into the /samples ?
- put this kind of mathmetical lib (math3D) into some /ee/maths/3D to be able then to add other kind of math lib (Cephes,...) ?

Just asking....
- TiTAN Art Division -
http://www.titandemo.org
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

The sample is in $PS2SDK/samples/math3d, after you compile and install ps2sdk.

As for /ee/maths/etc... there is such a thing as too much abstration. :)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

What? No /ee/math/3d/rotational/clockwise/29degrees/ directory? :)
User avatar
Shazz
Posts: 244
Joined: Tue Aug 31, 2004 11:42 pm
Location: Somewhere over the rainbow
Contact:

Post by Shazz »

puf puf :D

You don't know what you miss J.F, I've got a really impressive so-few-cycles PI/3 rad anticlockwise routine for unlimited vertices using in the same time the 2 VUs and believe it or not, using the IPU to approximate PI/3 ....

But I won't give it to you ! :P
- TiTAN Art Division -
http://www.titandemo.org
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

WAHHHHHH!!!!

:)

I agree that you can go too far when dividing up code. It's fine the way it's handled now.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Any word on testing PAL? I've compiled it up for various formats and put them up on my site just in case people are lazy. :)

http://www.oopo.net/consoledev/files/math3d-demo.tgz
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

for me the ntsc and pal version look ok
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

w00t
Post Reply