Near to what I was after, see what you think.
Rem Project: phyberakawindow2
Rem Created: 11/08/2006 19:40:57
Rem ***** Main Source File *****
Rem Project: phybreakthechair1
Rem Created: 11/08/2006 17:54:44
Rem ***** Main Source File *****
sync on
sync rate 60
phy start
autocam off
position camera 0,20,-75
point camera 25,10,0
make light 1
set directional light 1, -5,-5,5
` make a background sphere
load image "stripe5.png",1000
make object sphere 1000,400,48,48
texture object 1000,1000
scale object texture 1000,6,6
set object cull 1000,0
rotate object 1000,0,0,90
`make a physics material for the objects
phy make material 1, "wooden"
phy set material static friction 1, 25.0
phy set material restitution 1, 0.0
phy set material dynamic friction 1, 1.0
phy build material 1
glass=2
phy make material glass,"glass"
phy set material static friction glass,0.1
phy set material dynamic friction glass,0.1
phy set material restitution glass,0.25
phy build material glass
` make our ground
load image "stripe6.png", 3
make object box 1,100,1,100
phy make rigid body static box 1
texture object 1, 3
`prepare the variables for creating chairs
global lw# = 1.0
global lt# = 10.0
global cw# = 5.0
global sw# = 11.0
global cxp# = -10.0
global cyp# = 10.0
global wh# = 35.0
`drop the ball
make object sphere 6,6
position object 6,0,120,0
phy make rigid body dynamic sphere 6
` change this to make heavier
phy set rigid body mass 6,2000
`make a chair
create_window(-5,0,0.0,10)
create_window(6,0,0,24)
do
phy update
sync
loop
function create_window(cxp#,cyp#,wh#,first_obj)
rem lw# = 1.0 lt# = 10.0 cw# = 5.0 sw# = 11.0 cxp# = -10.0 cyp# = 10.0 wh# = 35.0
rem w h d
rem sill for window
make object box first_obj,(sw#*3)-2,lw#*2+0.2,lw#*2
position object first_obj,cxp#+2,(wh#+lt#)-cw#-1.1,cyp#
color object first_obj,RGB(159,253,218)
phy make rigid body static box first_obj,2
framecol=RGB(128,0,0)
glasscol=rgb(159,253,218)
rem pane 1
make object box first_obj+1,sw#-2,lw#*9,lw#
position object first_obj+1,cxp#,(wh#+lt#)+0.5,cyp#
color object first_obj+1,glasscol
ghost object on first_obj+1,2
phy make rigid body dynamic box first_obj+1,2
rem left bottom frame
make object box first_obj+2,sw#-1,lw#,lw#
position object first_obj+2,cxp#-0.5,(wh#+lt#)-4.5.,cyp#
color object first_obj+2,framecol
phy make rigid body dynamic box first_obj+2,1
rem left side frame 1
make object box first_obj+3,lw#,sw#-1,lw#
position object first_obj+3,cxp#-5.0,wh#+lt#+1.0,cyp#
color object first_obj+3,framecol
phy make rigid body dynamic box first_obj+3,1
rem left top frame 1
make object box first_obj+4,sw#-1,lw#,lw#
position object first_obj+4,cxp#+0.5,wh#+lt#+5.5,cyp#
color object first_obj+4,framecol
phy make rigid body dynamic box first_obj+4,1
rem right side frame 1
make object box first_obj+5,lw#,sw#-1,lw#
position object first_obj+5,cxp#+5.0,wh#+lt#,cyp#
color object first_obj+5,framecol
phy make rigid body dynamic box first_obj+5,1
rem next pane 2
make object box first_obj+6,sw#-2,lw#*9,lw#
position object first_obj+6,cxp#,wh#+lt#+sw#-0.5,cyp#
color object first_obj+6,glasscol
ghost object on first_obj+6,2
phy make rigid body dynamic box first_obj+6,2
rem left side frame 2
make object box first_obj+7,lw#,sw#-1,lw#
position object first_obj+7,cxp#-5.0,wh#+lt#+sw#,cyp#
color object first_obj+7,framecol
phy make rigid body dynamic box first_obj+7,1
rem top frame 2
make object box first_obj+8,sw#-1,lw#,lw#
position object first_obj+8,cxp#+0.5,wh#+lt#+sw#+4.6,cyp#
color object first_obj+8,framecol
phy make rigid body dynamic box first_obj+8,1
rem right frame 2
make object box first_obj+9,lw#,sw#-2,lw#
position object first_obj+9,cxp#+5.0,wh#+lt#+sw#-0.5,cyp#
color object first_obj+9,framecol
phy make rigid body dynamic box first_obj+9,1
rem next pane 3
make object box first_obj+10,sw#-2,lw#*9,lw#
position object first_obj+10,cxp#,wh#+lt#+(sw#*2)-0.5,cyp#
color object first_obj+10,glasscol
ghost object on first_obj+10,2
phy make rigid body dynamic box first_obj+10,2
rem left side frame 3
make object box first_obj+11,lw#,sw#-1,lw#
position object first_obj+11,cxp#-5.0,wh#+lt#+(sw#*2),cyp#
color object first_obj+11,framecol
phy make rigid body dynamic box first_obj+11,1
rem top frame 3
make object box first_obj+12,sw#-1,lw#,lw#
position object first_obj+12,cxp#+0.5,wh#+lt#+(sw#*2)+4.6,cyp#
color object first_obj+12,framecol
phy make rigid body dynamic box first_obj+12,1
rem right frame 3
make object box first_obj+13,lw#,sw#-2,lw#
position object first_obj+13,cxp#+5.0,wh#+lt#+(sw#*2)-0.5,cyp#
color object first_obj+13,framecol
phy make rigid body dynamic box first_obj+13,1
remstart
rem pane bottom right 4
make object box first_obj+14,sw#-2,lw#*9,lw#
position object first_obj+14,cxp#+sw#-0.9,(wh#+lt#)+0.5,cyp#
color object first_obj+14,glasscol
ghost object on first_obj+14,2
phy make rigid body dynamic box first_obj+14,2
rem right bottom frame 4
make object box first_obj+15,sw#-1.0,lw#,lw#
position object first_obj+15,cxp#+sw#-0.9,(wh#+lt#)-4.5.,cyp#
color object first_obj+15,framecol
phy make rigid body dynamic box first_obj+15,1
rem right side frame 4
make object box first_obj+16,lw#,sw#-1,lw#
position object first_obj+16,cxp#+sw#+5.1,wh#+lt#,cyp#
color object first_obj+16,framecol
phy make rigid body dynamic box first_obj+16,1
rem right top frame 4
make object box first_obj+17,sw#-1.5,lw#,lw#
position object first_obj+17,cxp#+sw#-0.9,wh#+lt#+5.5,cyp#
color object first_obj+17,framecol
phy make rigid body dynamic box first_obj+17,1
remend
rem join them up
rem bottom left
phy make fixed joint first_obj,first_obj,first_obj+2
phy make fixed joint first_obj+1,first_obj+2,first_obj+1
phy make fixed joint first_obj+2,first_obj+3,first_obj+1
phy make fixed joint first_obj+3,first_obj+4,first_obj+1
phy make fixed joint first_obj+4,first_obj+5,first_obj+1
rem middle left
phy make fixed joint first_obj+5,first_obj+4,first_obj+6
phy make fixed joint first_obj+6,first_obj+7,first_obj+6
phy make fixed joint first_obj+7,first_obj+8,first_obj+6
phy make fixed joint first_obj+8,first_obj+9,first_obj+6
rem top left
phy make fixed joint first_obj+9,first_obj+11,first_obj+10
phy make fixed joint first_obj+10,first_obj+12,first_obj+10
phy make fixed joint first_obj+11,first_obj+13,first_obj+10
`phy make fixed joint first_obj+12,first_obj+13,first_obj+10
for jj=first_obj to first_obj+13
phy set joint break limits jj, 7000, 7000
next jj
endfunction
Dark Physics makes any hot drink go cold.