3D Points
-
- Posts: 523
- Joined: Mon Jun 03, 2013 4:54 pm
3D Points
It's not that complicated yet. So far it has
Add points
Connect points with various distances and strengths (they will pull on each other, and there's a resistance force applied to everything proportional to velocity for friction)
Remove these connections
Move the view around (but not rotate it)
Drag points around
Saving/loading (done!)
Flatten (new!)
Length error (new!)
Displaying distances between points (done!)
I'm planning to add:
Rotating the view (3d angles are complicated!)
Deleting points
Merging points
Maybe:
Changing frictional force
Copy-pasting
Changing masses of particles (the current parameter does nothing)
Since angles are not fixed, you need braces to hold together shapes larger than triangles.
So far I've made a triangle (drawing starts somewhere!), tetrahedron, octahedron, cube (surprisingly difficult since you need twice the edges as normal for bracing), and icosahedron.
I was planning to use this to create a virtual paper model of the hyperbolic plane, since I don't want to tape stuff together.
You do not have the required permissions to view the files attached to this post.
Last edited by A Random Player on Mon Mar 10, 2014 11:42 am, edited 4 times in total.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
Always check your units or you will have no money!
- robly18
- Posts: 413
- Joined: Tue Jun 04, 2013 2:03 pm
Re: 3D Points
Woah! This is insane! Good luck with that, let me know how it goes!
Convincing people that 0.9999... = 1 since 2012
-
- Posts: 523
- Joined: Mon Jun 03, 2013 4:54 pm
Re: 3D Points
Done with saving/loading (well, I was already done yesterday), and made keypresses only work if form is in focus. Also added a flatten function (squeezes everything toward X-Y plane)
Edit: Added a "length error" display (shows how far the connections are from the equilibrium) and a distance display for two points.
Edit: Added a "length error" display (shows how far the connections are from the equilibrium) and a distance display for two points.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
Always check your units or you will have no money!
- testtubegames
- Site Admin
- Posts: 1164
- Joined: Mon Nov 19, 2012 7:54 pm
Re: 3D Points
Cool! Are all those points I see scattered around your 'pool' of vertices? Looks like your shape is rising through the air in a stream of bubbles -- neat effect, actually. Also, love the simple way you represent distance.
-
- Posts: 523
- Joined: Mon Jun 03, 2013 4:54 pm
Re: 3D Points
Yeah, it's easier to just grab a point from the surrounding pool than clicking the button every time. They don't actually rise like bubbles thoughtesttubegames wrote:Cool! Are all those points I see scattered around your 'pool' of vertices? Looks like your shape is rising through the air in a stream of bubbles -- neat effect, actually. Also, love the simple way you represent distance.

The distance is not entirely correct for the points - Their radius is currently proportional to 1/z, but true spheres would appear larger.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
Always check your units or you will have no money!
- robly18
- Posts: 413
- Joined: Tue Jun 04, 2013 2:03 pm
Re: 3D Points
Wouldn't the real radius be... I'll be honest, trig is something I haven't learned yet. Still, I think it would be something along the lines of arctan(z) ?A Random Player wrote:Yeah, it's easier to just grab a point from the surrounding pool than clicking the button every time. They don't actually rise like bubbles thoughtesttubegames wrote:Cool! Are all those points I see scattered around your 'pool' of vertices? Looks like your shape is rising through the air in a stream of bubbles -- neat effect, actually. Also, love the simple way you represent distance.
The distance is not entirely correct for the points - Their radius is currently proportional to 1/z, but true spheres would appear larger.
Convincing people that 0.9999... = 1 since 2012
- testtubegames
- Site Admin
- Posts: 1164
- Joined: Mon Nov 19, 2012 7:54 pm
Re: 3D Points
Huh. Got me thinking -- and I jotted down a little diagram. By my reckoning you are more right than you think. (Or maybe it depends on your projection scheme? I'm no expert, so feel free to enlighten me)A Random Player wrote:The distance is not entirely correct for the points - Their radius is currently proportional to 1/z, but true spheres would appear larger.
My back of the envelope figure-- On the left is your eye, the far right is the 'sphere' in 3D space, and in between is the 2D screen where you're drawing it. They'll trace out similar triangles, which means that r/d = r'/d'. Or that r' = c/d, where c is just some constant of your choosing. So the radius on screen should indeed go as 1/z (at least if your 'z' is considered the distance from the viewer, I suppose.)
Does that make sense, or am I missing something?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 523
- Joined: Mon Jun 03, 2013 4:54 pm
Re: 3D Points
Ah, but that assumes that the sphere is a 2d circle perpendicular to your line of vision. Example: You look down at the (idealized) earth as a flea (with an eye basically on the surface). It looks infinite to you. If it were a circle centered at the earth's center, you would see it as a disk below you.testtubegames wrote:Huh. Got me thinking -- and I jotted down a little diagram. By my reckoning you are more right than you think. (Or maybe it depends on your projection scheme? I'm no expert, so feel free to enlighten me)A Random Player wrote:The distance is not entirely correct for the points - Their radius is currently proportional to 1/z, but true spheres would appear larger.
My back of the envelope figure-- On the left is your eye, the far right is the 'sphere' in 3D space, and in between is the 2D screen where you're drawing it. They'll trace out similar triangles, which means that r/d = r'/d'. Or that r' = c/d, where c is just some constant of your choosing. So the radius on screen should indeed go as 1/z (at least if your 'z' is considered the distance from the viewer, I suppose.)
Does that make sense, or am I missing something?
Edit: Here's a better version.
You do not have the required permissions to view the files attached to this post.
$1 = 100¢ = (10¢)^2 = ($0.10)^2 = $0.01 = 1¢ [1]
Always check your units or you will have no money!
Always check your units or you will have no money!
- testtubegames
- Site Admin
- Posts: 1164
- Joined: Mon Nov 19, 2012 7:54 pm
Re: 3D Points
Ah, sure, of course! Good call. Gotta remember that computer screens are flat (... for now?A Random Player wrote:Ah, but that assumes that the sphere is a 2d circle perpendicular to your line of vision.
