I altered MISapplet to reinitialize values if the animation window changes size. In my java programs I store my own pixel values at a set resolution so I can stretch the animation window without breaking the code or increasing computation. I also store my own array because short of overriding computeImage, you can not nicely alter the pix[] array. To aid my computations I added the method set(int,int,int,int,int,int,int,int,Matrix) in Matrix.java to copy the contents from a part of one matrix into a part of another.
- [ spacebar ] : change exponent (toggle between bulb and brot)
| MISapplet - Mandelbulb |
-J-Djava.security.policy=applet.policy
The code lets you either read the image from a URL, read the image from a local txt file, or generate the image. The latter two are commented out. The txt files are available for download separately.
Backward Triangles
- [ arrow keys ] : x,y rotation speed
- [ wasd ] : x,y in-place rotation speed
- [ / ] : stop rotation
- [ spacebar ] : reset screen
| MISapplet - Triangulation |
If a triangle is facing forwards I fill it in. If one is facing backwards I only draw the edges.
___________________________________________________________________________________
No comments:
Post a Comment