forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Proposed Addition: A vector/matrix math library.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Mar 18, 2005 2:41 am    Post subject: Proposed Addition: A vector/matrix math library. Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
modman



Joined: 12 Feb 2005
Posts: 31
Location: Philadelphia, PA

PostPosted: Fri Mar 18, 2005 3:42 am    Post subject: Reply with quote

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

Quote:
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/
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Sun Mar 20, 2005 3:23 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sun Mar 20, 2005 6:57 pm    Post subject: Reply with quote

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

Enjoy!
Back to top
View user's profile Send private message Visit poster's website
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Sun Mar 20, 2005 7:24 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sun Mar 20, 2005 7:32 pm    Post subject: Reply with quote

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. :)
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Mar 21, 2005 2:56 am    Post subject: Reply with quote

What? No /ee/math/3d/rotational/clockwise/29degrees/ directory? :)
Back to top
View user's profile Send private message AIM Address
Shazz



Joined: 31 Aug 2004
Posts: 244
Location: Somewhere over the rainbow

PostPosted: Mon Mar 21, 2005 4:12 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Mar 21, 2005 12:40 pm    Post subject: Reply with quote

WAHHHHHH!!!!

:)

I agree that you can go too far when dividing up code. It's fine the way it's handled now.
Back to top
View user's profile Send private message AIM Address
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Mon Mar 21, 2005 2:40 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Mon Mar 21, 2005 3:49 pm    Post subject: Reply with quote

for me the ntsc and pal version look ok
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Mon Mar 21, 2005 3:53 pm    Post subject: Reply with quote

w00t
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group