[Thyme][1.5.61]Thyme Command/Variables List
123 posts • Page 3 of 5 • 1, 2, 3, 4, 5
Re: [Thyme][1.5.61]Thyme Command/Variables List
You can get the density of the object from e.geom/e.other .density
The Mass, I am not as sure. If you know the area of the object, then just multiply the area with the density and then you get the mass.
The Mass, I am not as sure. If you know the area of the object, then just multiply the area with the density and then you get the mass.
<- Designed by PhysicsGuy
-
xplane80 - Posts: 498
- Joined: Mon Aug 31, 2009 7:28 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
xplane80 wrote:You can get the density of the object from e.geom/e.other .density
The Mass, I am not as sure. If you know the area of the object, then just multiply the area with the density and then you get the mass.
Yea i already knew the Density thing, however density is something else.
but how can you know the area? lol
- TimTheOne
- Posts: 40
- Joined: Tue Jan 12, 2010 9:22 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
SizeX * SizeY = area. Though you can't access the sizes via e.other/geom.size
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
Rideg wrote:SizeX * SizeY = area. Though you can't access the sizes via e.other/geom.size
Unfortunately it's not just x*y. That's just the area of a rectangle. If you have unreguar polygons you have difficult calculations to solve.
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: [Thyme][1.5.61]Thyme Command/Variables List
forgot that srry , It's not impossible but then I think you would have to mutiply all the surfaces am I right??
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
I don't know how they do it in algodoo. For geometries with an infinite amount of surfaces you have to integrate many parts and then add / substract them from each other so that in the end you get the overall area. With polygons like in algodoo with a finite amount I think you can use the trapezium algorithm. Because there can be so much surfaces it's only possible with a computer. To calculate it yourself would take forever
-
KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: [Thyme][1.5.61]Thyme Command/Variables List
KarateBrot wrote:I don't know how they do it in algodoo. For geometries with an infinite amount of surfaces you have to integrate many parts and then add / substract them from each other so that in the end you get the overall area. With polygons like in algodoo with a finite amount I think you can use the trapezium algorithm. Because there can be so much surfaces it's only possible with a computer. To calculate it yourself would take forever
Overlap would be difficult to calculate i assume, but area of a single surface is a relatively straightforward function.
- Code: Select all
Scene.my.For100In = (a, r, c)=>{
Scene.my.For10In(a,((r + 10) > (c + 10) ? {c + 10} : {c}),(c - (c % 10)));
((c + 10) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 10 + 10) ? {c + 20} : {c + 10}),(c + 10 - (c % 10)))} : {};
((c + 20) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 20 + 10) ? {c + 30} : {c + 20}),(c + 20 - (c % 10)))} : {};
((c + 30) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 30 + 10) ? {c + 40} : {c + 30}),(c + 30 - (c % 10)))} : {};
((c + 40) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 40 + 10) ? {c + 50} : {c + 40}),(c + 40 - (c % 10)))} : {};
((c + 50) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 50 + 10) ? {c + 60} : {c + 50}),(c + 50 - (c % 10)))} : {};
((c + 60) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 60 + 10) ? {c + 70} : {c + 60}),(c + 60 - (c % 10)))} : {};
((c + 70) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 70 + 10) ? {c + 80} : {c + 70}),(c + 70 - (c % 10)))} : {};
((c + 80) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 80 + 10) ? {c + 90} : {c + 80}),(c + 80 - (c % 10)))} : {};
((c + 90) < (r + 10)) ? {Scene.my.For10In(a,((r + 10) > (c + 90 + 10) ? {c + 100} : {c + 90}),(c + 90 - (c % 10)))} : {};
((c + 90) < (r + 10)) ? {Scene.my.For100In(a,r,(c + 100))} : {}};
Scene.my.For10In = (a, r, c)=>{
((c < r)) ? {a(c);} : {};
((c + 1) < r) ? {a(c + 1);} : {};
((c + 2) < r) ? {a(c + 2);} : {};
((c + 3) < r) ? {a(c + 3);} : {};
((c + 4) < r) ? {a(c + 4);} : {};
((c + 5) < r) ? {a(c + 5);} : {};
((c + 6) < r) ? {a(c + 6);} : {};
((c + 7) < r) ? {a(c + 7);} : {};
((c + 8) < r) ? {a(c + 8);} : {};
((c + 9) < r) ? {a(c + 9);} : {};
((c + 9) < r) ? {Scene.my.For10In (a,r,(c + 10))} : {}};
Scene.my.Pro02CheckSize = (name)=>{TEMParray := name ++ ["THISISTHEENDOFTHEARRAYHERE"];Found := false;Size := 0;Scene.my.For100In((x)=>{found ? {} : {(((TEMParray(x)) + "") == "THISISTHEENDOFTHEARRAYHERE" ? {Found = true} : {};Size = x}},(100),0);(Size - 1)};
Scene.my.Area = (aoxy)=>{Scene.my.AreaIn(aoxy,0,0.0,Scene.my.Pro02CheckSize(aoxy))};
Scene.my.AreaIn = (aoxy,c,a,s)=>{c <= s ? {Scene.my.AreaIn(aoxy,(c + 1),(a + (aoxy(c)(0) * ((aoxy((c + 1) % (s + 1))(1)) - (aoxy(((c - 1) < 0 ? (s) : (c-1)))(1))))),s)} : {a/2.0}};
Working out multi-surface polygon area is not particularly easy to do if you don't know which are negatives and which are positives, but if you do (I suppose it wouldn't be too difficult), it's not too hard to do, by just subtracting negatives and adding positives.
- gradyfitz
- Posts: 174
- Joined: Tue Sep 01, 2009 8:33 am
- Location: Victoria, Australia
Re: [Thyme][1.5.61]Thyme Command/Variables List
Very helpful when it comes to my scripting and nice that you've listed everything together.
I don't suffer from insanity. I enjoy every minute of it.
-
Rrobba - [Best Sig 2010]
- Posts: 1480
- Joined: Mon Aug 31, 2009 6:01 pm
- Location: Gibraltar
Re: [Thyme][1.5.61]Thyme Command/Variables List
I need help, the tracers don't spawn
- Code: Select all
(e)=>{
scene.addcircle({
radius := 0.06;
density := 12;
pos := e.pos;
color := [1.0, 0.9763333, 0.29000002, 1.0];
drawcake := false;
attraction := -10000;
collideset := 64;
onhitbylaser := ((e)=>{attraction = 0})
});
scene.addpen({
size := 0.11;
color := [0.8580386, 0.8580386, 0.8580386, 0.175];
fadetime := 1.0
});
scene.addpen({
size := 0.1;
color := [1.0, 0.8333333, 0.0, 0.735];
fadetime := 0.4
});
scene.addpen({
size := 0.09;
color := [0.8580386, 0.8580386, 0.8580386, 0.37];
fadetime := 0.6
});
scene.addpen({
size := 0.08;
color := [0.8580386, 0.14300644, 0.0, 0.682];
fadetime := 0.1
})
}
- mbartelsm
- Posts: 9
- Joined: Tue May 25, 2010 2:57 am
Re: [Thyme][1.5.61]Thyme Command/Variables List
Maybe adding the pos will help?
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
-
Matten - Posts: 435
- Joined: Mon Apr 05, 2010 2:03 pm
- Location: The Netherlands
Re: [Thyme][1.5.61]Thyme Command/Variables List
- Code: Select all
(e)=>{
scene.addcircle({
radius := 0.06;
density := 12;
pos := e.pos;
color := [1.0, 0.9763333, 0.29000002, 1.0];
drawcake := false;
attraction := -10000;
collideset := 64;
GeomID := 1;
onhitbylaser := ((e)=>{attraction = 0})
});
scene.addpen({Geom := 1;relPoint := [0.0, 0.0];
size := 0.11;
color := [0.8580386, 0.8580386, 0.8580386, 0.175];
fadetime := 1.0
});
scene.addpen({Geom := 1;relPoint := [0.0, 0.0];
size := 0.1;
color := [1.0, 0.8333333, 0.0, 0.735];
fadetime := 0.4
});
scene.addpen({Geom := 1;relPoint := [0.0, 0.0];
size := 0.09;
color := [0.8580386, 0.8580386, 0.8580386, 0.37];
fadetime := 0.6
});
scene.addpen({Geom := 1;relPoint := [0.0, 0.0];
size := 0.08;
color := [0.8580386, 0.14300644, 0.0, 0.682];
fadetime := 0.1
})
}
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
geomIDs are ok but for beginners, I would recommend using pos because it's easier to learn.
<- Designed by PhysicsGuy
-
xplane80 - Posts: 498
- Joined: Mon Aug 31, 2009 7:28 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
It's not a big difference plus if you spawn a circle with a tracer inside an other object then the pen might stick to the object that wasn't spawned.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
Hmmm..
Maybe something to try, you can spawn hinges far away from the object, is this also possible with tracers?
Maybe something to try, you can spawn hinges far away from the object, is this also possible with tracers?
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
-
Matten - Posts: 435
- Joined: Mon Apr 05, 2010 2:03 pm
- Location: The Netherlands
Re: [Thyme][1.5.61]Thyme Command/Variables List
nope they always need to be on the object..
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
Quick question: Is there a way to set custom default collision group for lasers?
Like draw a laser with "g" as a collision group?
Like draw a laser with "g" as a collision group?
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
Same as you would with an object, set the collideset to whatever number is needed.
<- Designed by PhysicsGuy
-
xplane80 - Posts: 498
- Joined: Mon Aug 31, 2009 7:28 pm
Re: [Thyme][1.5.61]Thyme Command/Variables List
No I mean is there a way to access the default collision groups through the console so when I draw a laser it will have 64 as a collision group.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
damn, Hope they can implement it
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
Re: [Thyme][1.5.61]Thyme Command/Variables List
Good idea! You can change the deafault values and you can save the "defaults" just like the skins right now.
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
-
Matten - Posts: 435
- Joined: Mon Apr 05, 2010 2:03 pm
- Location: The Netherlands
Re: [Thyme][1.5.61]Thyme Command/Variables List
Or you can just stop being lazy and change it manually.
TheWinkits wrote:They both looks of cuking amazing
-
Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: [Thyme][1.5.61]Thyme Command/Variables List
But I mean the defaults for when the scene is running. Example:
You made a machine and you need to input geoms with collideSet CE, it's not handy if everytime you make a new geom for the machine, you put it on the ground and change the collideSet. So if you make the default collision group CE, you can just work normal.
You made a machine and you need to input geoms with collideSet CE, it's not handy if everytime you make a new geom for the machine, you put it on the ground and change the collideSet. So if you make the default collision group CE, you can just work normal.
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
-
Matten - Posts: 435
- Joined: Mon Apr 05, 2010 2:03 pm
- Location: The Netherlands
Re: [Thyme][1.5.61]Thyme Command/Variables List
Chronos wrote:stop being lazy
TheWinkits wrote:They both looks of cuking amazing
-
Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: [Thyme][1.5.61]Thyme Command/Variables List
I almost never use lasers with 127 as a collision group.
make sure to check out my work.
-
Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
123 posts • Page 3 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 1 guest