เขียนcodeแก้ปัญหาจากpantipเล่น

https://pantip.com/topic/38221485/

code สำหรับปัญหานี้

https://www.wolframcloud.com/objects/sompob/test/pantip_01Nov18.nb

Manipulate[
Show[
  Graphics[{EdgeForm[Pink], FaceForm[Blue], 
    Rectangle[{1 - Cos[-15 Degree], 0}, {x, 
      x - (1 - Cos[-15 Degree])}]}],
  Graphics[{EdgeForm[LightBlue], FaceForm[Black], 
    Rotate[Rectangle[{0, 0}], -15 Degree, {1, 0}],
    PlotRange -> {{-2, 2}, {-2, 2}} }],
  Graphics[
   Text["Area of the Big Square:" <> 
     ToString[(x - (1. - Cos[15 Degree]))^2/(0.5*Sin[15 Degree]*
         Cos[15 Degree])], {0.25, 1.5}]]
   ],
 {{x, 1.259, "side"}, 0.1, 2, 0.001}
 ]

 

 

%d bloggers like this: