attr roofAngleGable=25 #屋顶下部坡度
attr roofAngleHip=25#顶部坡度
Lot-->
extrude(20)
comp(f){top:color("#0000ff")TopFacade |side:color("#ff0000")SideFacade. |all:NIL}
TopFacade-->
roofGable(roofAngleGable)
split(y){ '0.5: comp(f){bottom: NIL | horizontal:RoofHip |aslant:FlatRoof_Tex. | all:color("#00ff00")RoofSide. }}
RoofHip-->
roofHip(roofAngleHip)
FlatRoof_Tex.
attr roofAngleHip=30#屋顶下部坡度
attr roofAngleGable=30 #屋顶上部坡度
attr overHang=0.4#延伸出来的长度
Lot-->
extrude(20)
comp(f){top:color("#0000ff")TopFacade |side:color("#ff0000")SideFacade. | all:NIL}
TopFacade-->
roofHip(roofAngleHip,overHang)
split(y){ '0.5: comp(f){bottom: NIL | horizontal:RoofGable|all:FlatRoof_Tex. } }
RoofGable-->
roofGable(roofAngleGable)
comp(f){bottom:NIL | aslant:FlatRoof_Tex. | side:color("#00ff00")RoofSide.}
attr roofAngleGable=40 #屋顶下部坡度
attr roofAngleGable02=25#顶部坡度
Lot-->
extrude(20)
comp(f){top:color("#0000ff")TopFacade |side:color("#ff0000")SideFacade. |all:NIL}
TopFacade-->
roofGable(roofAngleGable)
split(y){ '0.5: comp(f){bottom: NIL | horizontal:RoofGable |aslant:FlatRoof_Tex. | all:color("#00ff00")RoofSide. }}
RoofGable-->
roofGable(roofAngleGable02)
comp(f){bottom: NIL |aslant: FlatRoof_Tex. | all: color( "#00ff00") RoofSide. }attrroofAngleHip=40 #屋顶下部坡度
attrroofAngleHip02=25 #顶部坡度
Lot-->
extrude(20)
comp(f){top:color("#0000ff")TopFacade | side:color("#ff0000")SideFacade. | all:NIL}
TopFacade-->
roofHip(roofAngleHip)
split(y){ scope.sy*0.3:comp(f){ bottom:NIL |horizontal: RoofHip | all:FlatRoof_Tex. } }
RoofHip-->
roofHip(roofAngleHip02)
FlatRoof_Tex.attr curvedAngleResolution=15#相邻顶面的坡度差
@Hidden
attr ArcNum01=90/curvedAngleResolution-1
@Hidden
attr calcSegmentHt(ArcNum)= 3* (cos(ArcNum*curvedAngleResolution) - cos((ArcNum+1)*curvedAngleResolution))
Lot-->
extrude(20)
comp(f){top:color("#0000ff")VaultRoof(ArcNum01) |side:color("#ff0000")SideFacade. |all:NIL}
VaultRoof(n)-->
case n> 0:
roofGable(n*curvedAngleResolution,0,0,false,0)
split(y){ (calcSegmentHt(n)):comp(f){bottom:NIL | horizontal: VaultRoof(n-1) | aslant:FlatRoof_Tex. |all:color("#00ff00")RoofSide.}}
else:
comp(f){bottom: NIL | all: FlatRoof_Tex. }attr curvedAngleResolution=15#相邻顶面的坡度差
@Hidden
attr ArcNum01=90/curvedAngleResolution-1
@Hidden
attr calcSegmentHt(ArcNum)= 3* (cos(ArcNum*curvedAngleResolution) - cos((ArcNum+1)*curvedAngleResolution))
Lot-->
extrude(20)
comp(f){top:color("#0000ff")DomeRoof(ArcNum01) |side:color("#ff0000")SideFacade. |all:NIL}
DomeRoof(n)-->
case n> 0:
roofHip(n*curvedAngleResolution)
split(y){ (calcSegmentHt(n)):comp(f){ bottom:NIL |horizontal: DomeRoof(n-1) |all:FlatRoof_Tex.} }
else:
comp(f){bottom: NIL | all: FlatRoof_Tex.}