0% found this document useful (0 votes)
183 views9 pages

Rotating in 4D by My Way

Ken-Soft software and the World Search my blog software Research Learning Globally Engaged. Web Development HTML / XHTML PHP CSS Java / Applets Artificial Intelligence Game Development Programming Linguistics Language tools Japanese Chinese World Culture Japan China America Learning Rubik's Cube.

Uploaded by

Prasan Veni
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views9 pages

Rotating in 4D by My Way

Ken-Soft software and the World Search my blog software Research Learning Globally Engaged. Web Development HTML / XHTML PHP CSS Java / Applets Artificial Intelligence Game Development Programming Linguistics Language tools Japanese Chinese World Culture Japan China America Learning Rubik's Cube.

Uploaded by

Prasan Veni
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Ken-Soft

Software and the World

Search my blog Software Research Learning Globally Engaged Home Software Development General Development Web Development HTML/XHTML PHP CSS Java/Applets Artificial Intelligence Game Development Programming Linguistics Language Tools Japanese Chinese World Culture Japan China America Learning Rubik's Cube

Links Damn Small Linux (DSL) PureBasic Ubuntu Linux About

Subscribe
Subscribe through a RSS feed reader News Feed Comments Feed Follow Me:

Recent Posts

Create a Multilingual Website in PHP using a MySQL database John Conways Game of Life + Mutation (C/C++) Neural Network (Back-Error Propagation) C++ Graph 3D (Vector Rotation Source Included) C++ SDL - Simple Space Shooter Game Demo 3D Cube Engine - Java 4D Maze - (Java) 4D Rotation Matrix - Graph 4D Thog Problem C++ Dynamic Memory Allocation (2D and 3D) Sprite Class in C++ using SDL Rubiks Cube - 2D Implementation - Java Load Neural Network Training data from XML (PDF) Neural Network - Load Train Data from XML - Java Neural Network - Back-Error Propagation - Java Multilinked List - Doubly Linked - Java 3D Rotation Matrix - Graph 3D Kana Tutor Magus Map Maker - 2D Multilayer Map Blocks - Advanced Tetris Clone (Written in

Purebasic) Vulcan I - (Written in Purebasic) Neural Networks - Simple Models (PDF) PDF Logical Method for Solving the 3!3!3 Rubiks Cube xx Creating Multi-lingual Webpages using PHP (part 1) Send SMS Messages to Every Cell Phone in America

Archives

January 2010 December 2009 September 2009 June 2009 March 2009 January 2009 December 2008
Advertisements
Master Animation Learn more than tools & software Only @ Frameboxx. Apply right away! Frameboxx.in/AnimationCourses 3D Animation in 24 months Get advanced diploma in AD3D NEXT Join MAAC, the leaders in 3D & VFX www.MAACindia.com Buy your TOF camera Fotonic manufactures 3D cameras based on time-offlight technology www.fotonic.com Automatic Polarimeter Rudolph Instruments' DigiPol is now available with 21CFR11 Compliance www.rudolphinst.com

3D Animation Courses Find Info. On Courses & Colleges in Animation. Sign up Now, Its Free! MingleBox.com/Animation-Course Ultrasound Imaging

Ultrasound Imaging Affordable High Quality Ultrasound, Probes, and Service. www.uit1.com Charts for Adobe Flex Interactive, animated & data-driven Over 55 chart types supported. www.fusioncharts.com/flex Sex determination Find accurate and free articles by leading doctors IndianWomensHealth.com

Admin

Log in

4D Rotation Matrix - Graph 4D


Posted under General Development, Java, Mathematics, Programming by Kenny on Thursday 8 January 2009 at 3:52 pm This program rotates points about the XY, YZ, XZ, XU, YU, and ZU axises. I then projects each 4D vector to the 2D canvas. The Jar file can be downloaded here: Graph4D.jar

Before looking at the source, lets take a look at some of the fundamental mathematics behind the software. If you are uncomfortable with the thought of 4D matrix rotations, then I recommend reading Wikipedia, or checking out my article about 3D graphing, which can be found here. In this example, I will only show the 4D rotation matrices. Note that for each rotation matrix, 2 axises are held still while the vector is rotated around the

other two axises. This may be hard to visualize at first, but It will become clear after a while.

The source code can be found below as well as being bundled into the Jar file.

Transform4D.java - contains method for rotating a 4D vector Transform4D.java Point4D.java Graph4D.java

9 Comments
1. Pingback by Ken-Soft Graph3D - Rotation3D Project 3D to 2D January 8, 2009 @ 4:17 pm [...] Graph4D - Rotation4D - Project to 2D [...] 2. Comment by Onendehopolve February 24, 2009 @ 4:27 am Thank you! 3. Comment by Joe Whitehead July 21, 2009 @ 1:38 am Finally! I was looking for a wireframe 4D graph to play with. Thanks. 4. Comment by Kenny July 21, 2009 @ 12:03 pm np. glad it is useful 5. Comment by NeuroFuzzy December 7, 2009 @ 1:30 am hmm does this mean that to express any four dimensional rotation, you need 6 angle values? 6. Comment by Kenny December 7, 2009 @ 2:25 am >NeuroFuzzy No. It just means that there are 6 different elementary ways to rotate a 4D Vector (X, Y, Z, U). Possible rotations in 4D space include:

X vector around the Y X vector around the Z X vector around the U Y vector around the Z Y vector around the U Z vector around the U So this leaves 6 rotations, (of course removing symmetric rotations. i.e. XU = UX, YU = UY, etc) in 5D space (X, Y, Z, U, W) you would then have X vector around the Y X vector around the Z X vector around the U X vector around the W Y vector around the Z Y vector around the U Y vector around the W Z vector around the U Z vector around the W U vector around the W for a total of 10 rotation matrices. 7. Comment by NeuroFuzzy December 7, 2009 @ 6:18 pm thank you for the fast reply! Im trying to make a 4 dimensional object viewer, and Im wondering how many different user inputs i would need to be able to be able to show all possible rotations of a four dimensional object. Eulers rotation theorem states that you only need 3 angles to describe an arbitrary rotation, but that only applies to 3 dimensions. I guess that ill start out using the result of six rotation matrices but i really dont want to if i can use fewer. 8. Comment by Kenny December 8, 2009 @ 12:38 am

No problem. and yes these rotation matrices only describe the rotation around a specific Axis. You would need to derive a rotation matrix for rotations around any given vector (which is possible, though I honestly am not sure how to do this off the top of my head), Refer to my 3D rotation matrices page and note that I use quaternions to define a rotation around any arbitrary axis as it is simpler. Im going to guess that there exists a similar method for mapping 4D rotations. As for a 4 dimension object viewer, I will be uploading various 3D function and 4D function/object viewing software I recently flung together in C++. They have correspondingly contain a Vector3D.h and Vector4D.h file with some useful rotation functions. and getUnitVector() functions. Also, about a 4D viewer, since 4D is not directly viewable you will have to come up with some creative way to represent it. for example, taking a slice of the 4D object, which is 3D and displaying it. So in a sense draw multiple slices. Or do something like change the color of the dot depending on its 4D value. so High 4D values represent a White pixel and fade to Blue or Black as the values go more negative. Etc. Also dig through the source files (included in the JAR) on this page and youll see how it all works. 9. Comment by NeuroFuzzy December 8, 2009 @ 9:40 pm Im planning to have a 3d-to-2d camera, which the user views through a standard camera, controlled by the movement of the mouse. The 3d world will be given by a 4d-to-3d camera, IE 4D lines intersecting a 3d cube, as opposed to 3d lines intersecting a 2d plane. If things get too complicated, doe to the nature of euler angles (problems like gimbal lock, and odd rotation patterns), i might limit the program to

rotation on the YU axis, for now. Besides that, ill definitely take a look at all the source code, it might be really helpful RSS feed for comments on this post. TrackBack URI

Leave a comment
Name (required) Mail (will not be published) (required) Website XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Copyright 2009 www.Ken-Soft.com

You might also like