One rotational axis on two rectangles' corners?
9 posts • Page 1 of 1
One rotational axis on two rectangles' corners?
Something like the image attached where the two rectangles will rotate on one common axis aligned on their corners. The rectangles should also collide themselves -(not rotating towards the left side).
So, is this possible?
P.S If this isn't possible, can you suggest another software that can do this?
So, is this possible?
P.S If this isn't possible, can you suggest another software that can do this?
- Attachments
-
- algodoo1.png (18.44 KiB) Viewed 1465 times
- Gyros
- Posts: 4
- Joined: Fri Sep 04, 2015 5:43 pm
Re: One rotational axis on two rectangles' corners?
Well it is possible if the rectangles are fixated/glued to each other
[scene]113590[/scene]
[scene]113590[/scene]
waiting for semester break to come...
-
faytree - Posts: 947
- Joined: Mon Nov 05, 2012 1:37 pm
- Location: Selangor, Malaysia
Re: One rotational axis on two rectangles' corners?
Q: So, is this possible?
A: Yes
1. Make two boxes with some space between them.
2. Put a hinge on the upper left corner of one box.
3. Put a hinge on the upper right corner of the other box.
4. Copy both boxes with hinges.
5. Paste into Notepad or some other text editor.
6. Edit both Hinge geom1pos to be the same value.
7. Copy all.
8. Paste into Algodoo.
A: Yes
1. Make two boxes with some space between them.
2. Put a hinge on the upper left corner of one box.
3. Put a hinge on the upper right corner of the other box.
4. Copy both boxes with hinges.
5. Paste into Notepad or some other text editor.
6. Edit both Hinge geom1pos to be the same value.
7. Copy all.
8. Paste into Algodoo.
- s_noonan
- Posts: 61
- Joined: Tue Mar 30, 2010 2:25 am
Re: One rotational axis on two rectangles' corners?
faytree
I need a rotational axis between them, not glue.
s_noonan
Thanks, but there is a problem: The hinge is fixed on the background.
I only need it to connect the two corners.
So I put a square behind the box before I place the hinge (and the square fell when I pressed play -who cares) but although it looks correct, it doesn't collide each box with the other one. Is there a cure?
(Since the save&share didn't share it, and the forum login wasn't accepted to upload it, I just paste the code):
I need a rotational axis between them, not glue.
s_noonan
Thanks, but there is a problem: The hinge is fixed on the background.
I only need it to connect the two corners.
So I put a square behind the box before I place the hinge (and the square fell when I pressed play -who cares) but although it looks correct, it doesn't collide each box with the other one. Is there a cure?
(Since the save&share didn't share it, and the forum login wasn't accepted to upload it, I just paste the code):
- Code: Select all
// FileVersion 21
// Phunlet created by Algodoo v2.1.0
FileInfo -> {
title = "algotest";
author = "MyName";
version = 21
};
Scene.addBox {
inertiaMultiplier := 1.0000000;
resources := [];
timeToLive := +inf;
textureClamped := [false, false];
adhesion := 0.00000000;
attractionType := 2;
attraction := 0.00000000;
textScale := 0.50000000;
texture := "";
update := (e)=>{};
controllerInvertX := false;
controllerInvertY := false;
showMomentum := false;
textConstrained := true;
vel := [0.10499314, -0.0060263211];
restitution := 0.50000000;
onCollide := (e)=>{};
killer := false;
materialVelocity := 0.00000000;
showForceArrows := false;
controllerReverseXY := false;
refractiveIndex := 1.5000000;
textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
immortal := false;
ruler := false;
textColor := [1.0000000, 1.0000000, 1.0000000, 1.0000000];
area := 1.0000000;
collideSet := 1;
drawBorder := true;
reflectiveness := 1.0000000;
size := [0.50000000, 2.0000000];
friction := 0.50000000;
entityID := 30;
velocityDamping := [0.00000000, 0.00000000, 0.00000000];
onClick := (e)=>{};
color := [0.34078258, 0.22948726, 0.25977975, 1.0000000];
collideWater := true;
onSpawn := (e)=>{};
materialName := "";
textFontSize := 32.000000;
onHitByLaser := (e)=>{};
textFont := "Verdana";
pos := [0.73641706, 2.3776793];
onDie := (e)=>{};
density := 2.0000000;
airFrictionMult := 1.0000000;
controllerAcc := 11.000000;
colorHSVA := [343.66913, 0.32658750, 0.34078258, 1.0000000];
angvel := 0.14167765;
heteroCollide := false;
glued := false;
onKey := (e)=>{};
showVelocity := false;
postStep := (e)=>{};
text := "";
opaqueBorders := true;
geomID := 21;
body := 27;
edgeBlur := 0.00000000;
angle := 0.24046022;
zDepth := 6.0000000;
layer := 0
};
Scene.addBox {
inertiaMultiplier := 1.0000000;
resources := [];
timeToLive := +inf;
textureClamped := [false, false];
adhesion := 0.00000000;
attractionType := 2;
attraction := 0.00000000;
textScale := 0.50000000;
texture := "";
update := (e)=>{};
controllerInvertX := false;
controllerInvertY := false;
showMomentum := false;
textConstrained := true;
vel := [-0.019002791, 0.00018820968];
restitution := 0.50000000;
onCollide := (e)=>{};
killer := false;
materialVelocity := 0.00000000;
showForceArrows := false;
controllerReverseXY := false;
refractiveIndex := 1.5000000;
textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
immortal := false;
ruler := false;
textColor := [1.0000000, 1.0000000, 1.0000000, 1.0000000];
area := 1.0000000;
collideSet := 1;
drawBorder := true;
reflectiveness := 1.0000000;
size := [0.50000000, 2.0000000];
friction := 0.50000000;
entityID := 31;
velocityDamping := [0.00000000, 0.00000000, 0.00000000];
onClick := (e)=>{};
color := [0.34078258, 0.22948726, 0.25977975, 1.0000000];
collideWater := true;
onSpawn := (e)=>{};
materialName := "";
textFontSize := 32.000000;
onHitByLaser := (e)=>{};
textFont := "Verdana";
pos := [0.50094157, 4.4115758];
onDie := (e)=>{};
density := 2.0000000;
airFrictionMult := 1.0000000;
controllerAcc := 11.000000;
colorHSVA := [343.66913, 0.32658750, 0.34078258, 1.0000000];
angvel := -0.022088438;
heteroCollide := false;
glued := false;
onKey := (e)=>{};
showVelocity := false;
postStep := (e)=>{};
text := "";
opaqueBorders := true;
geomID := 22;
body := 29;
edgeBlur := 0.00000000;
angle := -0.010640174;
zDepth := 7.0000000;
layer := 0
};
Scene.addHinge {
geom0 := 22;
geom0pos := [0.25065804, -0.99975634];
geom1 := 21;
geom1pos := [0.25005758, 1.0007651];
color := [0.76284236, 0.49407157, 0.97995669, 1.0000000];
motorTorque := 100.00000;
ccw := false;
opaqueBorders := true;
forceDirectSolve := false;
timeToLive := +inf;
update := (e)=>{};
bendTarget := NaN;
allowDirectSolve := true;
hingeConstant := NaN;
motorSpeed := 1.5707964;
entityID := 32;
onSpawn := (e)=>{};
autoBrake := false;
zDepth := 8.0000000;
resources := [];
size := 0.015073270;
bend := false;
legacyMode := 1;
onDie := (e)=>{};
onClick := (e)=>{};
postStep := (e)=>{};
impulseLimit := +inf;
distanceLimit := +inf;
motor := false;
bendConstant := NaN;
onKey := (e)=>{};
colorHSVA := [273.18942, 0.49582306, 0.97995669, 1.0000000];
autoBend := false;
layer := 0;
totImp3 := [0.016068339, -0.31624973, 0.00000000]
};
Scene.addHinge {
geom0 := 22;
geom0pos := [-0.0017319024, 0.86035872];
geom1 := 0;
geom1pos := [0.50836396, 5.2719054];
color := [0.52687675, 0.30617762, 0.12111876, 1.0000000];
motorTorque := 100.00000;
ccw := false;
opaqueBorders := true;
forceDirectSolve := false;
timeToLive := +inf;
update := (e)=>{};
bendTarget := NaN;
allowDirectSolve := true;
hingeConstant := NaN;
motorSpeed := 1.5707964;
entityID := 33;
onSpawn := (e)=>{};
autoBrake := false;
zDepth := 9.0000000;
resources := [];
size := 0.31250000;
bend := false;
legacyMode := 1;
onDie := (e)=>{};
onClick := (e)=>{};
postStep := (e)=>{};
impulseLimit := +inf;
distanceLimit := +inf;
motor := false;
bendConstant := NaN;
onKey := (e)=>{};
colorHSVA := [27.364910, 0.77011937, 0.52687675, 1.0000000];
autoBend := false;
layer := 0;
totImp3 := [-0.048718169, 0.64153326, 0.00000000]
}
- Gyros
- Posts: 4
- Joined: Fri Sep 04, 2015 5:43 pm
Re: One rotational axis on two rectangles' corners?
Also, the hinge behaves like a suspension. I need a hinge with zero elasticity. Most hinges' elasticity is practically negligible. This is clearly another design flaw which restricts serious usage:
- Gyros
- Posts: 4
- Joined: Fri Sep 04, 2015 5:43 pm
Re: One rotational axis on two rectangles' corners?
1. Put a small circle where the hinges will go.
2. Make a box with its corner in the center of the circle.
3. Add a hinge to the corner of the box at the center of the circle.
4. Move the box away from the circle. The hinge will stretch.
5. Make a second box with its corner at the center of the circle.
6. Add a hinge to the corner of the box at the center of the circle.
7. Move the first box corner back to the center of the circle.
8. Make the circle invisible and no collision layers.
9. Make the hingeConstants for the hinges equal +inf.
2. Make a box with its corner in the center of the circle.
3. Add a hinge to the corner of the box at the center of the circle.
4. Move the box away from the circle. The hinge will stretch.
5. Make a second box with its corner at the center of the circle.
6. Add a hinge to the corner of the box at the center of the circle.
7. Move the first box corner back to the center of the circle.
8. Make the circle invisible and no collision layers.
9. Make the hingeConstants for the hinges equal +inf.
- Code: Select all
// FileVersion 21
// Phunlet created by Algodoo v2.1.0
FileInfo -> {
title = "algotest";
author = "MyName";
version = 21
};
Scene.addBox {
inertiaMultiplier := 1.0000000;
resources := [];
timeToLive := +inf;
textureClamped := [false, false];
adhesion := 0.00000000;
attractionType := 2;
attraction := 0.00000000;
textScale := 0.50000000;
texture := "";
update := (e)=>{};
controllerInvertX := false;
controllerInvertY := false;
showMomentum := false;
textConstrained := true;
vel := [1.2134361, 0.25019103];
restitution := 0.50000000;
onCollide := (e)=>{};
killer := false;
materialVelocity := 0.00000000;
showForceArrows := false;
controllerReverseXY := false;
refractiveIndex := 1.5000000;
textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
immortal := false;
ruler := false;
textColor := [1.0000000, 1.0000000, 1.0000000, 1.0000000];
area := 0.25000000;
collideSet := 1;
drawBorder := false;
reflectiveness := 1.0000000;
size := [1.0000000, 0.25000000];
friction := 0.50000000;
entityID := 190;
velocityDamping := [0.00000000, 0.00000000, 0.00000000];
onClick := (e)=>{};
color := [0.28345907, 0.81034070, 0.81130737, 1.0000000];
collideWater := true;
onSpawn := (e)=>{};
materialName := "";
textFontSize := 32.000000;
onHitByLaser := (e)=>{};
textFont := "Verdana";
pos := [0.26533276, 3.3796051];
onDie := (e)=>{};
density := 2.0000000;
airFrictionMult := 1.0000000;
controllerAcc := 11.000000;
colorHSVA := [180.10988, 0.65061444, 0.81130737, 1.0000000];
angvel := 1.1629854;
heteroCollide := false;
glued := false;
onKey := (e)=>{};
showVelocity := false;
postStep := (e)=>{};
text := "";
opaqueBorders := false;
geomID := 8448;
body := 8488;
edgeBlur := 0.00000000;
angle := -1.0371001;
zDepth := 7.0000000;
layer := 0
};
Scene.addBox {
inertiaMultiplier := 1.0000000;
resources := [];
timeToLive := +inf;
textureClamped := [false, false];
adhesion := 0.00000000;
attractionType := 2;
attraction := 0.00000000;
textScale := 0.50000000;
texture := "";
update := (e)=>{};
controllerInvertX := false;
controllerInvertY := false;
showMomentum := false;
textConstrained := true;
vel := [0.27253801, -0.0041947328];
restitution := 0.50000000;
onCollide := (e)=>{};
killer := false;
materialVelocity := 0.00000000;
showForceArrows := false;
controllerReverseXY := false;
refractiveIndex := 1.5000000;
textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
immortal := false;
ruler := false;
textColor := [1.0000000, 1.0000000, 1.0000000, 1.0000000];
area := 0.25000000;
collideSet := 1;
drawBorder := false;
reflectiveness := 1.0000000;
size := [1.0000000, 0.25000000];
friction := 0.50000000;
entityID := 189;
velocityDamping := [0.00000000, 0.00000000, 0.00000000];
onClick := (e)=>{};
color := [0.019938530, 0.38580859, 0.75484771, 1.0000000];
collideWater := true;
onSpawn := (e)=>{};
materialName := "";
textFontSize := 32.000000;
onHitByLaser := (e)=>{};
textFont := "Verdana";
pos := [-0.0028993022, 4.3751216];
onDie := (e)=>{};
density := 2.0000000;
airFrictionMult := 1.0000000;
controllerAcc := 11.000000;
colorHSVA := [210.12936, 0.97358602, 0.75484771, 1.0000000];
angvel := 0.72710180;
heteroCollide := false;
glued := false;
onKey := (e)=>{};
showVelocity := false;
postStep := (e)=>{};
text := "";
opaqueBorders := false;
geomID := 8446;
body := 8485;
edgeBlur := 0.00000000;
angle := -1.5780174;
zDepth := 6.0000000;
layer := 0
};
Scene.addCircle {
inertiaMultiplier := 1.0000000;
resources := [];
timeToLive := +inf;
textureClamped := [false, false];
adhesion := 0.00000000;
attractionType := 2;
attraction := 0.00000000;
texture := "";
update := (e)=>{};
controllerInvertX := false;
controllerInvertY := false;
showMomentum := false;
vel := [0.63743597, 0.081264287];
restitution := 0.50000000;
onCollide := (e)=>{};
killer := false;
materialVelocity := 0.00000000;
showForceArrows := false;
controllerReverseXY := false;
refractiveIndex := 1.5000000;
textureMatrix := [1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000, 0.00000000, 0.00000000, 0.00000000, 1.0000000];
protractor := false;
immortal := false;
area := 0.00076699042;
collideSet := 0;
drawBorder := false;
reflectiveness := 1.0000000;
friction := 0.50000000;
entityID := 188;
velocityDamping := [0.00000000, 0.00000000, 0.00000000];
onClick := (e)=>{};
color := [0.48948625, 0.10195863, 0.86031300, 0.00000000];
collideWater := true;
onSpawn := (e)=>{};
materialName := "";
onHitByLaser := (e)=>{};
drawCake := false;
pos := [0.11850666, 3.8741231];
onDie := (e)=>{};
density := 2.0000000;
airFrictionMult := 1.0000000;
controllerAcc := 11.000000;
colorHSVA := [270.66068, 0.88148659, 0.86031300, 0.00000000];
radius := 0.015625000;
angvel := -2.4688175;
heteroCollide := false;
glued := false;
onKey := (e)=>{};
showVelocity := false;
postStep := (e)=>{};
opaqueBorders := false;
geomID := 8444;
body := 8482;
edgeBlur := 0.00000000;
angle := 1.4419578;
zDepth := 5.0000000;
layer := 0
};
Scene.addHinge {
geom0 := 8448;
geom0pos := [-0.50000000, 0.12500000];
geom1 := 8444;
geom1pos := [0.00000000, 0.00000000];
color := [0.66091198, 0.14423236, 0.38810205, 1.0000000];
motorTorque := 100.00000;
ccw := false;
opaqueBorders := false;
forceDirectSolve := false;
timeToLive := +inf;
update := (e)=>{};
bendTarget := NaN;
allowDirectSolve := true;
hingeConstant := +inf;
motorSpeed := 1.5707964;
entityID := 193;
onSpawn := (e)=>{};
autoBrake := false;
zDepth := 9.0000000;
resources := [];
size := 0.021420853;
bend := false;
legacyMode := 1;
onDie := (e)=>{};
onClick := (e)=>{};
postStep := (e)=>{};
impulseLimit := +inf;
distanceLimit := +inf;
motor := false;
bendConstant := NaN;
onKey := (e)=>{};
colorHSVA := [331.68036, 0.78176767, 0.66091198, 1.0000000];
autoBend := false;
layer := 0;
totImp3 := [-0.014187948, 0.085569285, 0.00000000]
};
Scene.addHinge {
geom0 := 8446;
geom0pos := [0.50000000, 0.12500000];
geom1 := 8444;
geom1pos := [0.00000000, 0.00000000];
color := [0.50777227, 0.70993078, 0.72071522, 1.0000000];
motorTorque := 100.00000;
ccw := false;
opaqueBorders := false;
forceDirectSolve := false;
timeToLive := +inf;
update := (e)=>{};
bendTarget := NaN;
allowDirectSolve := true;
hingeConstant := +inf;
motorSpeed := 1.5707964;
entityID := 192;
onSpawn := (e)=>{};
autoBrake := false;
zDepth := 8.0000000;
resources := [];
size := 0.019531250;
bend := false;
legacyMode := 1;
onDie := (e)=>{};
onClick := (e)=>{};
postStep := (e)=>{};
impulseLimit := +inf;
distanceLimit := +inf;
motor := false;
bendConstant := NaN;
onKey := (e)=>{};
colorHSVA := [183.03868, 0.29546061, 0.72071522, 1.0000000];
autoBend := false;
layer := 0;
totImp3 := [0.014142277, -0.085835584, 0.00000000]
};
Scene.addHinge {
geom0 := 8446;
geom0pos := [-0.37480831, 0.00019117697];
geom1 := 0;
geom1pos := [0.00000000, 4.7500000];
color := [0.064892575, 0.21712957, 0.47664937, 1.0000000];
motorTorque := 100.00000;
ccw := false;
opaqueBorders := false;
forceDirectSolve := false;
timeToLive := +inf;
update := (e)=>{};
bendTarget := NaN;
allowDirectSolve := true;
hingeConstant := NaN;
motorSpeed := 1.5707964;
entityID := 194;
onSpawn := (e)=>{};
autoBrake := false;
zDepth := 10.000000;
resources := [];
size := 0.15625000;
bend := false;
legacyMode := 1;
onDie := (e)=>{};
onClick := (e)=>{};
postStep := (e)=>{};
impulseLimit := +inf;
distanceLimit := +inf;
motor := false;
bendConstant := NaN;
onKey := (e)=>{};
colorHSVA := [217.81647, 0.86385679, 0.47664937, 1.0000000];
autoBend := false;
layer := 0;
totImp3 := [-0.0079828538, 0.16853787, 0.00000000]
}
- s_noonan
- Posts: 61
- Joined: Tue Mar 30, 2010 2:25 am
Re: One rotational axis on two rectangles' corners?
Here's another way:
1. Connect two boxes with a hinge at the corners.
2. Clone one of the boxes.
3. Place the cloned box directly over the original.
4. Glue the original and cloned box together.
1. Connect two boxes with a hinge at the corners.
2. Clone one of the boxes.
3. Place the cloned box directly over the original.
4. Glue the original and cloned box together.
- s_noonan
- Posts: 61
- Joined: Tue Mar 30, 2010 2:25 am
Re: One rotational axis on two rectangles' corners?
Thanks,
Can there be added friction to the hinges?
Edit: I just found out about the air friction. Maybe that will do.
Can there be added friction to the hinges?
Edit: I just found out about the air friction. Maybe that will do.
- Gyros
- Posts: 4
- Joined: Fri Sep 04, 2015 5:43 pm
Re: One rotational axis on two rectangles' corners?
Q: Can there be added friction to the hinges?
A: Set autoBend = true and set bendConstant to some value. Creates damping.
A: Set autoBend = true and set bendConstant to some value. Creates damping.
- s_noonan
- Posts: 61
- Joined: Tue Mar 30, 2010 2:25 am
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests