maine-imre / handwaver

A gesture-based mathematical making environment from the University of Maine
http://www.imrelab.org
8 stars 2 forks source link

Scenes for a study of scale and dimension #13

Closed camden-bock closed 5 years ago

camden-bock commented 5 years ago

Is your feature request related to a problem? Please describe. This is discussed in Dimmel's proposal, appendix B. MODIFIED AUG 19, 2019

Describe the solution you'd like A set of figures that extend the sandbox dimension with analogs in 2,3 and 4 dimensions.

The scene will have a set of figures that can be viewed using a set of lenses. Additionally, some actions (events) can be applied to each figure).

Figures:

Lenses

Projection Algorithms

Cross-Sections --> Are these a separate object?

Net Folding --> These can exist if we consider an unfolding of the mesh

Translation

Rotation

Important Design Considerations If we allow translation and rotation, do we need more general cross-sections? Can we solve all of the projection problems with 4D --> 3D?

camden-bock commented 5 years ago

@reneyost123 is working on commenting the NetFoldingTasks, and checking their accuracy.

camden-bock commented 5 years ago

@camden-bock added network support through PUN, with a build flag toggle.

In theory, an avatar system can be dropped in place. If the slider is synced, no other values need to be synced. The avatar system can be taken out of the HigherDimDodgeball scene.

camden-bock commented 5 years ago

The slider needs to be debugged and bounded. There should be variables in the editor for the bounds fo the slider. (consider intrepreting slider values from 0 to 1 and using a Vector2 to set max/min bounds.)

camden-bock commented 5 years ago

UV mappings need to be done for hypercube and tetrahedron

camden-bock commented 5 years ago

Double-sided textures need to be applied.

camden-bock commented 5 years ago

@reneyost123 has been developing a script for copying a mesh at runtime for task set 3. We then need to have mesh inputs for each of these figures.

All of these figures could be considered cases of the figures in Task 1, where they are completely folded. Alternatively, we could export blender models for each figure.

camden-bock commented 5 years ago

We need to add editor controls for changing the perspective on 4D objects.

camden-bock commented 5 years ago

Added 4D perspective controls. Attempted to patch slider bugs. Needs testing

camden-bock commented 5 years ago

We need to add line renders to the 4D objects to show their 2D edges. @reneyost123 please take a look at this this week.

camden-bock commented 5 years ago

@reneyost123 has added a script that copies and scales any mesh and line render on an object, which dynamically updates.

camden-bock commented 5 years ago

The five cell is pretty confusing to look at.

camden-bock commented 5 years ago

function key mapping for toggling objects added.

camden-bock commented 5 years ago

There are some weird mathematical errors in the folding script. We might consider moving to Unity.Mathematics.

camden-bock commented 5 years ago

Both the five cell and the eight cell are not folding properly. This is clear when we rotate the representation.

Part of the problem might be using 4D euler angles. 3D euler angles don't work well, so I'd imagine that there are more problems in 4D.

It seems that rotors might be the generalization we are looking for. @reneyost123 let's think about how to write a general case for this (R^n) based on the float[n] construct in Unity.Mathematics. We would write a static script that we would use throughout our project.

Similarly, we should rewrite our projection algorithm to be generalized for R^n. The two of these will take some linear algebra and some algebra to sort out.

camden-bock commented 5 years ago

Alternatively, the new Unity math system supports matrices. We could do a similar process with a matrix.

https://math.stackexchange.com/questions/197772/generalized-rotation-matrix-in-n-dimensional-space-around-n-2-unit-vector

reneyost123 commented 5 years ago

The net folding for the triangle, square, tetrahedron, and cube is working properly both with the override option for folding and the animated folding.

The five-cell and hypercube still need to be worked on.

reneyost123 commented 5 years ago

The cross-section of a torus could result in a few shapes, such as an ellipse, or two circles.

https://en.wikipedia.org/wiki/Spiric_section

reneyost123 commented 5 years ago

The mathematics for a spiric cross-section has been solved for and parameterized, though certain constant parameter values need to be decided on.

camden-bock commented 5 years ago

Prototype Status:

camden-bock commented 5 years ago

The toric sections need some work to debug.

camden-bock commented 5 years ago

Hypersphere math is done. Used this result:

https://math.stackexchange.com/questions/1159613/would-the-cross-section-of-a-hypersphere-be-a-sphere

reneyost123 commented 5 years ago

Points have been added to the net foldings of the square and triangle. Points have also replaced line segments for cross-sections of 2-dimensional objects.

camden-bock commented 5 years ago

Hypertoric sections source: http://www.dr-mikes-maths.com/4d-torus.html

reneyost123 commented 5 years ago

Trying to solve for the maximum value of theta to find the location to start the sweep for the torus cross-section. After solving for r, we set both positive solutions equal to each other and solved for theta.

camden-bock commented 5 years ago

Most of the figures are prototyped:

We continue to have problems on the toric sections. That is on hold for now, considering replacing with conic sections.

The regular 5-cell's dihedral angle needs to be corrected.

camden-bock commented 5 years ago

Tweak all 4D nets and measures for better projections.

camden-bock commented 5 years ago

Previous Design Spec

Is your feature request related to a problem? Please describe. This is discussed in Dimmel's proposal, appendix B.

Describe the solution you'd like A set of figures that extend the sandbox dimension with analogs in 2,3 and 4 dimensions.

Enhancements

Additional context

camden-bock commented 5 years ago

All perspective data for projections should be formed into a struct.

reneyost123 commented 5 years ago

These pictures generally outline the mathematical process for calculating the cross section of a plane and a triangle. 20190923_162745 20190923_162751

camden-bock commented 5 years ago

The class for this structures the lenses into four objects:

Net mesh Standard Mesh (can be RTS, projected) Cross-section Mesh

Everything needs to be rendered with mesh renderers (no line renderers).

camden-bock commented 5 years ago

Actions are generally RTS at the world level. Everything in handled for 4D, though only 3D may be relevant.

camden-bock commented 5 years ago

Move to a different repository.