## 4D Viewer for 3D retina

Discuss interdimensional programming, Java applets and so forth.

### 4D Viewer for 3D retina

My project 4D Viewer aims to render 4D scene online using WebGL. github: https://github.com/wxyhly/4dViewer/blob/master/readme_en.md

Inspired by 4D-block java applet and miegakure, I use cross section and colored 3D voxel retina to visualize 4D scene. I have been following this forum for a long time, many concepts (like 4D planet, campass, steer wheel, 2d rail, rivers) are very attractive. I found that people talk a lot about them, but there are few simulations to let people see this fantastic 4D world. So this is what I want to do.

I made a 4d minecraft demo (always in creative mode). Introduction: https://wxyhly.github.io/programs/mc4tutorial.html . There are procedural generated villages, forests, deserts and rivers. In game, You can verify that cross river without swimming is true in 4D. Trajectory of the sun is Lissajous curve, which is a "realistic" behavior on 4D planet. The longitude and rotation speeds of two perpendicular planes are decided randomly by world seed. Recently a game called 4d Miner came out, which is 4D analogue of Minecraft. In fact it motivates me to write this post. I ever planed to make a multiplayer minecraft 4D game using c++, however got abandonded.

I also made a tiny rigid physic engine after seeing marc ten bosch's 4D toys. Introduction: https://wxyhly.github.io/archives/newton4/ (in Chinese). I didn't write any 2d or 3d physics engine before, so I have to learn it from beginning. My reference book is Game Physics Engine Development. I don't use traditional rotors in geometric algebra to represent rotation, instead, I use two quaternions of left / right isoclinic rotation, which is a better way for programming rotation (I think). With that you can watch how 4D round shapes roll on 3D floor (the rolling behavior of duocone is very strange) and how tigers are linked together. By simulating torque on the wheel and friction on the groud, I also veryfied some guessess of steering 4D car on 3D ground.

A simple path tracing javascript renderer is made for 4D minecraft. Demo: https://wxyhly.github.io/4dViewer/examples/pathtracer/minecraft4d.html?1 (Caution: Very slow, Not optimized at all). But I'm stuck at how to compress 3D voxel image data for transfering on the web.

This project is set up about three years ago. The code is very messy, I decided to rewrite it. I'll try to use new experimental technology WebGPU in order to render more complex 4D scenes. The work is in progress. I really want to see complex 4D cities and road networks created by artists.
wxyhly
Nullonian

Posts: 3
Joined: Thu Aug 02, 2018 2:06 pm
Location: Chengdu, China

### Re: 4D Viewer for 3D retina

I've written a book on this topic. You can get a preliminary copy for free here. https://www.researchgate.net/publicatio ... tric_Earth.

Among other things it has complex 4D road networks. Houses, surfboards....
PatrickPowers
Tetronian

Posts: 481
Joined: Wed Dec 02, 2015 1:36 am