Математика

Физика

Химия

Биология

Техника и    технологии

 

Загрузить исходник

 

global Boot,a,s,r,ry,sf

 

--property d

--global L21,L22,L23,L24,L25,NNx2,NNy2

 

 

 

on beginsprite me

  

  my = sprite(me.spriteNum).member

  

  my.resetWorld()

  

  Boot =0

  

  a=0

  

  s=0

  ---------------

  

  sf=0

  

  my.newTexture("backdrop", #fromCastmember, member("sky"))

  

  my.camera(1).insertBackdrop(1,my.texture("backdrop"), point(0,0), 0)

  ------------------------------------------------------------------------

  set the url of member "Trousers"="Trousers.swa"

  ------------------------------------------------------------------------

  --put member("my").modelResource("Plane").face[1].vertices

  

  --faces[#{1}]

  --( 0 ,0  ,0.25 )

  

  

  

  -- [vector(0,0,25) , vector(12.5,-12.5,0) , vector(12.5,12.5,0) ]

  

  --nm3.vertexList = [vector(0,0,25)  , vector(12.5,12.5,0) , vector(-12.5,12.5,0) ]

  

  --nm4.vertexList = [vector(0,0,25)  , vector(-12.5,12.5,0) , vector(-12.5,-12.5,0) ]

  

  

  -----------------------------------------------------------

  

  --myobrabotka1  0,0,25,-12.5,12.5,0,-12.5,-12.5,0,4

  

  

  -----------------------------------------------------------

  

  

  

  --getFace my 2

  --(0,0,25)

  --(12.5,-12.5,0)

  --(12.5,12.5,0)

  

  --myobrabotka2

  --  

  --  

  --  

  -- (0,0,25)

  --(12.5,12.5,0)

  --(-12.5,12.5,0)

  

  --myobrabotka3

  

  

  --  (0,0,25)

  --(-12.5,12.5,0)

  --(-12.5,-12.5,0)

  

  

  --myobrabotka4

  

  

  

end

 

 

 

on exitFrame me

  --set the url of member "Trousers"="Trousers.swa"

  --

  

  if (a=1) then

    --музыка

    myButton

    s=1

    --Алгорим обработки

    

    

    --Шаг за шагом

    

    

    --1 шаг

    

    if (s=1) then

      

      --myobrabotka1 0,0,25,-12.5,-12.5,0,12.5,-12.5,0, 1

      

      -- myobrabotka1 0,0,25,12.5,-12.5,0,12.5,12.5,0,2

      

      -- myobrabotka1 0,0,25,12.5,12.5,0,-12.5,12.5,0,3

      

      -- myobrabotka1  0,0,25,-12.5,12.5,0,-12.5,-12.5,0,4

      

      -- myobrabotka1  -12.5,-12.5,0,0,0,0,12.5,-12.5,0 ,5

      

      --myobrabotka1  12.5,-12.5,0,0,0,0,12.5,12.5,0 ,6

      

      -- myobrabotka1 12.5,12.5,0,0,0,0,-12.5,12.5,0 ,7

      

      -- myobrabotka1  -12.5,12.5,0,0,0,0,-12.5,-12.5,0 ,8

      

      

     -- MyModRes = member("my").newModelResource("myBox", #box, #front)

      

    --  MyModRes.length = 50

      

    --  MyModRes.width = 75

      

   --   MyModRes.height = 100

      

      

      repeat with ry  = 1 to 3

        -------------0-------------------------

        --27.102

        value3 =-0.225+27.122*(ry-1 )

        value6 = value3

        value9 = 27.736  +  27.552*(ry-1)

        

        

        --value3 = -0.225

        --value6 = -0.205

        --value9 = 27.736

        -------------1------------------------------

        

        --27.552

        --value9 = 27.736  +  27.552(ry-1)

        -----------------

        --value3 = 27.327

        --value6 = 27.347

        ----------------------

        --value9 = 27.736

        

        repeat with r = 1 to 8

          

          -- n=1

          -------------------------------------

          value1 = 1.074 +25*(r-1)

          value2 = 0.429

          

          

          --value3 = -0.225

          -------------------------------------

          value4 = 1.074 +25*((r+1)-1)

          value5 = 0.303

          --value6 = -0.225

          -------------------------------------

          --13,552

          --38,618

          

          --25.066

          --13.552 +25.066(n-1)

          -------------------------------------

          value7 = 13.552 + 25.066*(r-1)

          value8 = 0.463

          --value9 = 27.736

          

          --ry =1

          sf=sf+1--счетчик фигур

          myobrabotka1 value1,value2,value3,value4,value5,value6,value7,value8,value9,sf

          

        end repeat--x  

      end repeat--z  

      --------------------------------------

      value1 = 13.9

      value2 = 0.429

      value3 = 27.327

      --------------------------------------

      value4 = 38.899

      value5 = 0.303

      value6 = 27.347

      --------------------------------------

      

      --13,552

      --38,618

      

      --25.066

      --13.552 +25.066(n-1)

      --------------------------------------

      value7 = 26.377

      value8 = 0.463

      value9 = 55.288

      

      --------------------------------------

      

      --myobrabotka1 value1,value2,value3,value4,value5,value6,value7,value8,value9,3

      

      

      

      --------------------------------------

      value1 = 26.209

      value2 = 1.999

      value3 = -0.663

      --------------------------------------

      value4 = 13.021

      value5 = -0.428

      value6 = 26.863

      --------------------------------------

      

      --13,552

      --38,618

      

      --25.066

      --13.552 +25.066(n-1)

      --------------------------------------

      value7 = 38.013

      value8 = -0.376

      value9 = 27.489

      

      --------------------------------------

      

      --myobrabotka1 value1,value2,value3,value4,value5,value6,value7,value8,value9,4

      

      

      

      

      

      --  repeat with x = 1 to NNx

      ------------------------------------------

      --vectorx1  =1.074    +21*(x2-1)

      --vectorx2  =0.429    +21*(x2-1)

      --vectorx3  = -0.225   +21*(x2-1)

      ------------------------------------------

      

      ------------------------------------------

      --vectorx4  = 26.074    +21*(x2-1)

      --vectorx5  = 0.303     +21*(x2-1)

      --vectorx6  =-0.205      +21*(x2-1)

      ------------------------------------------

      

      ------------------------------------------

      --vectorx7  = 13.552     +21*(x2-1)

      --vectorx8  = 0.463    +21*(x2-1)

      --vectorx9  =27.736    +21*(x2-1)

      ------------------------------------------

      

      

      --myobrabotka1  value1,value2,value3,value4,value5,value6,value7,value8,value9,n

      

      --end repeat--x  

      

      a=2

    end if

    

    

  end if

  

  

  

  go the frame

  

  

  

end

 

 

-- создания обработки данных

--d =0

on myobrabotka1  value1,value2,value3,value4,value5,value6,value7,value8,value9,n

  

  --faces[#{1}]

  nm = member("my").newMesh("Plane"&n,1,3,0,3,0)

  --nm.vertexList = [vector(0,0,0), vector(20,0,0), vector(20, 20, 0)]

  --nm.vertexList = [vector(-5.205,-25.121 ,0.005 ), vector(-22.602,-25.121 ,0.005 ), vector(-13.904 ,-12.98,51.045 )]

  

  --getFace my 1

  --[0,0,25]

  --(-12.5,-12.5,0)

  --(12.5,-12.5,0)

  --d=0

 nm.vertexList = [vector( value1,value2,value3  ), vector(value4,value5,value6), vector(value7,value8,value9)]

  --nm.vertexList = [vector( 0 ,0  ,0.25 ), vector(-12.5,-12.5,0), vector(12.5,-12.5,0)   ]

  nm.face[1].vertices = [1,2,3]

  nm.colorList = [rgb(255,255,0), rgb(0, 255, 0), rgb(0,0,255)]

  nm.face[1].colors = [3,2,1]

  nm.generateNormals(#smooth)

  nm.build()

  nm = member("my").newModel("TriModel"&n, nm)

  

end --myobrabotka1

 

 

on myobrabotka2

  

  nm = member("my").newMesh("Plane"&2,1,3,0,3,0)

  --faces[#{3}]

  nm.vertexList = [vector(0,0,25) , vector(12.5,-12.5,0) , vector(12.5,12.5,0) ]

  nm.face[1].vertices = [1,2,3]

  nm.colorList = [rgb(255,255,0), rgb(0, 255, 0), rgb(0,0,255)]

  nm.face[1].colors = [3,2,1]

  nm.generateNormals(#smooth)

  nm.build()

  nm = member("my").newModel("TriModel"&2, nm)

  

end --myobrabotka2

 

 

on myobrabotka3

  

  nm3 = member("my").newMesh("Plane3",1,3,0,3,0)

  --faces[#{2}]

  nm3.vertexList = [vector(0,0,25)  , vector(12.5,12.5,0) , vector(-12.5,12.5,0) ]

  nm3.face[1].vertices = [1,2,3]

  nm3.colorList = [rgb(255,255,0), rgb(0, 255, 0), rgb(0,0,255)]

  nm3.face[1].colors = [3,2,1]

  nm3.generateNormals(#smooth)

  nm3.build()

  nm3 = member("my").newModel("TriModel3", nm3)

  

  

end --myobrabotka3  

 

 

on myobrabotka4

  

 nm4 = member("my").newMesh("Plane4",1,3,0,3,0)

  --faces[#{2}]

  nm4.vertexList = [vector(0,0,25)  , vector(-12.5,12.5,0) , vector(-12.5,-12.5,0) ]

  nm4.face[1].vertices = [1,2,3]

  nm4.colorList = [rgb(255,255,0), rgb(0, 255, 0), rgb(0,0,255)]

  nm4.face[1].colors = [3,2,1]

  nm4.generateNormals(#smooth)

  nm4.build()

  nm4 = member("my").newModel("TriModel4", nm4)

  

  

end --myobrabotka4

 

--Button

on  myButton

   if  Boot=0 then

      

      --set the url of member "Trousers"="Trousers.swa"

      play (member "Trousers")

      

      Boot=1

    end if

  

end  --myButton

----

--[1,2,3]

--[0,0,25]

--[-12.5,-12.5,0]

--[12.5,-12.5,0]

--------------------------------------------------

--[1,3,4]

--[0,0,25]

--[12.5,-12.5,0]

--[12.5,12.5,0]

--------------------------------------------------

--[1,4,5]

--[0,0,25]

--[12.5,12.5,0]

--[-12.5,12.5,0]

--------------------------------------------------

--[1,5,2]

--[0,0,25]

--[-12.5,12.5,0]

--[-12.5,-12.5,0]

Назад

Hosted by uCoz