All pastes #2054249 Raw Edit

Someone

public text v1 · immutable
#2054249 ·published 2011-05-05 15:23 UTC
rendered paste body
$counter = 0

def getXml(x,y,z) 
  $counter = $counter + 1
  uuid = sprintf("%012x", $counter);
  localid = 702000 + $counter
  return <<__EE__;
<SceneObjectGroup><RootPart><SceneObjectPart><CreatorID UUID="052b1be6-36b0-4871-ac5f-97a7893ba4cc" /><OwnerID UUID="052b1be6-36b0-48
71-ac5f-97a7893ba4cc" /><GroupID UUID="00000000-0000-0000-0000-000000000000" /><LastOwnerID UUID="00000000-0000-0000-0000-00000000000
0" /><CreationDate>1187485708</CreationDate><ParentID>0</ParentID><OwnerMask>2147483647</OwnerMask><NextOwnerMask>2147483647</NextOwn
erMask><GroupMask>2147483647</GroupMask><EveryoneMask>2147483647</EveryoneMask><BaseMask>2147483647</BaseMask><UUID UUID="c6ba1810-af
6f-49b7-a841-#{uuid}" /><LocalID>#{localid}</LocalID><Name>Funny thing</Name><ObjectFlags>4294967295</ObjectFlags><Material>0</Materi
al><RegionHandle>1099511628032000</RegionHandle><GroupPosition X="#{x}" Y="#{y}" Z="#{z}" /><OffsetPosition X="0" Y="0" Z="0" /><Rota
tionOffset X="0" Y="0" Z="0" W="1" /><Velocity X="0" Y="0" Z="0" /><AngularVelocity X="0" Y="0" Z="0" /><Acceleration X="0" Y="0" Z="
0" /><Description /><Text /><SitName /><TouchName /><Shape><PCode>9</PCode><PathBegin>0</PathBegin><PathEnd>0</PathEnd><PathScaleX>10
0</PathScaleX><PathScaleY>100</PathScaleY><PathShearX>0</PathShearX><PathShearY>0</PathShearY><PathSkew>0</PathSkew><ProfileBegin>0</
ProfileBegin><ProfileEnd>0</ProfileEnd><Scale X="0.5" Y="2.492188" Z="3.389984" /><PathCurve>16</PathCurve><ProfileCurve>1</ProfileCu
rve><ProfileHollow>0</ProfileHollow><PathRadiusOffset>0</PathRadiusOffset><PathRevolutions>0</PathRevolutions><PathTaperX>0</PathTape
rX><PathTaperY>0</PathTaperY><PathTwist>0</PathTwist><PathTwistBegin>0</PathTwistBegin><TextureEntry>AAAAAAAAAACZmQAAAAAABQQ27FJ2m9BO
K57woYB8YV4OABbxhQAAAACAPwAAAIA/AAAAAAAAAAAAAAAAAAD/</TextureEntry><ExtraParams>AA==</ExtraParams><ProfileShape>Square</ProfileShape>
<HollowShape>Same</HollowShape></Shape><Scale X="0.5" Y="2.492188" Z="3.389984" /></SceneObjectPart></RootPart><OtherParts /></SceneO
bjectGroup>
__EE__
end


print "<scene>\n"
0.upto(99) do |x|
  0.upto(99) do |y|
    x0 = x - 50.0
    y0 = y - 50.0
    z = 25.0 + Math.sqrt(x0*x0 + y0*y0)
    if ((x % 2 == 0 ) && (y % 2 == 0))
      print getXml(x0 + 128, y0 + 128, z)
      print "\n"
    end
  end
end
print "</scene>\n"