Formula Plane Creation

Suggest changes and improvements to Algodoo.

Formula Plane Creation

Postby Metagami » Tue Dec 28, 2010 3:53 am

I think it would be helpful if we could input an algebraic inequality to form a plane, to where you could move and rotate it. It would be very helpful to have parabola valleys and ramps, and cornered planes. What do you guys think?
User avatar
Metagami
 
Posts: 25
Joined: Sun Apr 11, 2010 4:36 am

Re: Formula Plane Creation

Postby Kilinich » Tue Dec 28, 2010 8:51 am

already have it. thyme scripting.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: Formula Plane Creation

Postby Metagami » Wed Dec 29, 2010 6:57 am

Really? How can I do this, I can't find any tutorials for it•
User avatar
Metagami
 
Posts: 25
Joined: Sun Apr 11, 2010 4:36 am

Re: Formula Plane Creation

Postby Someone Else » Fri Dec 31, 2010 7:59 am

Kilinich wrote:already have it. thyme scripting.


I think Metagami is aiming for a simple and efficient method of generating an infinite polygon WITHOUT STARTING THE SIM. Though, parabolas would be impossible- I am told that infinite polygons equal infinite lag. However, I do not see why CSG on planes wouldn't work. So long as the infinite parts are straight, it shouldn't mean infinite lag.

Thus, inequalities would be pointless. You would either get tons of lag or something easily built with CSG.

However, this brings to mind a form of CSG that would cut a curve out of a box on the path of an equation. That way, you could make a polygon in the exact shape of a parabola or whatever that you could then subtract out of a plane.

Example:
Code: Select all
y = 3x^2 + 2x + 5

where the spaces are only for the human reader and you would somewhere select the origin of the coordinate plane.

Better yet,
Code: Select all
x = r cos^-1 (1- (y/r)) - sqrt (y (2r - y))

for a cycloid where r is the radius of the rolling circle and that must be defined somewhere. Probably in another textbox labeled "Constants".

Parametrics could be accomplished in much the same way as multiple lines of thyme in the script menu. That is, with a semicolon signaling the end of a line.

Code: Select all
x = 8 sin z + z^5 ; y = 5 tan (z + sqrt pi)

would snap to:

Code: Select all
x = 8 sin z + z^5
y = 5 tan (z + sqrt pi)


Me, above wrote:Thus, inequalities would be pointless. You would either get tons of lag or something easily built with CSG.

Code: Select all
x > |y|

is simply one plane SUBTRACTING another, perpendicular plane.
Code: Select all
x < |y|

is one plane ADDING a perpendicular plane.

Linear formulas are single planes,
basically anything else falls into the category of laggy curves.

Though, being able to plug in the desired SLOPE of a plane certainly could be useful.
Then again, the brush tool may be the key.

:idea: You should be able to make a plane passing through a series of points. Dunno where it could be used (except for displaying solutions to inequalities), but nobody knew what to use the laser for when it was invented.

But please, Kilinich, tell us where to find these Thyme scripts you mentioned, or, preferably, post the link.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Formula Plane Creation

Postby electronicboy » Fri Dec 31, 2010 2:18 pm

A plane is an infinite "straight line", so the formula must create a straight line.

With the way algodoo works, to cut/use csg on a plane it would have to be converted in to a polygon of infinite length and size.
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: Formula Plane Creation

Postby Chronos » Fri Dec 31, 2010 3:25 pm

electronicboy wrote:A plane is an infinite "straight line", so the formula must create a straight line.

With the way algodoo works, to cut/use csg on a plane it would have to be converted in to a polygon of infinite length and size.

Or, it could convert a part of it into a polygon, the rest of it still being a plane. It wouldn't be that hard to have some code like:

[0,0] //The origin of the plane.
[3,0] //Another point on the plane, to determine the angle.
cut[4,0] //Makes the first cut at 4, 0.
cut[5,1] //Makes the second cut at 5, 1.
cut[6,0] //Makes the third cut at 6, 0.
stopcut //Stops cutting and creates a new cut.
cut[21, 8]
Etc.

You could also use cut1, cut2, and so on instead of stopcut.

Just an idea.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Formula Plane Creation

Postby Rideg » Sat Jan 01, 2011 3:49 am

Chronos wrote:
electronicboy wrote:A plane is an infinite "straight line", so the formula must create a straight line.

With the way algodoo works, to cut/use csg on a plane it would have to be converted in to a polygon of infinite length and size.

Or, it could convert a part of it into a polygon, the rest of it still being a plane. It wouldn't be that hard to have some code like:

[0,0] //The origin of the plane.
[3,0] //Another point on the plane, to determine the angle.
cut[4,0] //Makes the first cut at 4, 0.
cut[5,1] //Makes the second cut at 5, 1.
cut[6,0] //Makes the third cut at 6, 0.
stopcut //Stops cutting and creates a new cut.
cut[21, 8]
Etc.

You could also use cut1, cut2, and so on instead of stopcut.

Just an idea.

I remember suggesting something similar. I think it was something like:
Code: Select all
scene.addPlane({pos := [0.0, 0.0]; color := [0.3, 0.3, 0.3, 1.0]; size := [+inf, +inf] + [[[polygonSurfaces]]]})
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Formula Plane Creation

Postby Someone Else » Sat Jan 01, 2011 4:38 am

@Raydeg- That seems to simply spawn a plane passing thru two points. By:
Someone Else wrote: :idea: You should be able to make a plane passing through a series of points. Dunno where it could be used (except for displaying solutions to inequalities), but nobody knew what to use the laser for when it was invented.

I think I meant that you could plug in
Code: Select all
{(-5, 8), (-3, 4), (0, 7), (3, 1)}

and get a plane that passes thru those points in order. The first and last Cartesian coordinates simply determine the direction of the infinite parts from the adjacent coordinates.
This plane would, from left to right, slope downward from infinity, come back upward a ways, and slope downward to the opposite end of infinity.

@Chronos- You got the idea. :thumbup:

@Kilinich- WHERE ARE THOSE SCRIPTS?????
Sorry to blow up like that, but it is the only way to create these "planes" at the moment.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 6 guests