• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

what kind of maths should I know to write java2d and 3d programs?

 
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write programs and funs in Java 2d and 3d but not able to do
what I want due to my lack math knowledge please tell me what math should I know? any suggestion would be appreciated.

best regards,
omi
 
Marshal
Posts: 69837
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can better understand the affine transforms when you know about matrices and transformation matrices, but I have managed to get nice 2D applications to work without knowing any matrix arithmetic.

If you are doing anything with positions and angles then basic trigonometry (sin, cos, tan) and the difference between rectangular and polar coordinates are very useful.

By the way: If you are using affine transforms, always use a duplicate of the Graphics2D object to do the transformations on, particularly shear. There is a method in the Graphics class called copy() or something similar which returns a duplicate, so you don't need to use clone().
 
Campbell Ritchie
Marshal
Posts: 69837
278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I think you use the Graphics#create() methods, not copy().
 
Bobby Sharma
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply

you can tell me more if you forgot something in previous post.

best regards,
omi
 
author
Posts: 23879
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also....

Need to understand logical mathematics. Especially, working with binary, and hexedecimal numbers. So, bone up on you eigth grade math (in the US, this is taught in the eight grade). Without this, you probably won't understand the turning on/off of pixels.

Need to understand Algebra. I mean really really understand algebra. This is not too important, if you are not writing your own graphic library, but it is critical, if you are writing or modifying one. Raster graphics calculations are all done with algebra.

Neet to understand Geometry. Nuff said....


And as already mentioned, other maths are important too. There is some good news... I have never found the need to use my Calculus skills when working with graphics...

Henry
 
Bobby Sharma
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Henry , but you did not mention one thing,there is
a lot in algebra so which topics I should learn.I know only matrix,polynomials
and simultaneous equations.

Any good news for Trig too, can I do Trig math with special calculators.

best regards,
omi
 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by omi sharma:
Thanks for your reply Henry , but you did not mention one thing,there is
a lot in algebra so which topics I should learn.I know only matrix,polynomials
and simultaneous equations.

Any good news for Trig too, can I do Trig math with special calculators.

best regards,
omi



Yes, but you need to understand trigonometry.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For computer graphics, trigonometry (coordinate systems, vectors, matrices, etc.) is much more important than algebra.

Try searching with Google for "mathematics for computer graphics" and you'll find a whole list of interesting websites, for example this one, which directly addresses your question.

There are also books, such as this one or this one especially about mathematics for computer graphics.
[ August 22, 2008: Message edited by: Jesper Young ]
 
Ranch Hand
Posts: 1609
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you more serious on 2d-3d programming or just looking to use java2d programs? If you are trying to be a game developer or going to design/develope some cad kind application then you may want to try this way.
 
    Bookmark Topic Watch Topic
  • New Topic