Index of /vyuka/155pjin/03_web_pyscript

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[TXT]README.html2023-10-04 15:58 1.1K 
[TXT]hello.html2023-10-04 15:58 324  
[TXT]rajon_01.html2023-10-18 14:52 1.1K 
[TXT]rajon_02.html2023-10-04 15:58 1.8K 

      import math

      def rajon(stanovisko_y, stanovisko_x, orientace_y, orientace_x, smer_orientace, smer_bod, delka):
         dy_ab = orientace_y - stanovisko_y  # zmena zde
         dx_ab = orientace_x - stanovisko_x  # zmena zde
    
         smernik_ori = math.atan2(dy_ab, dx_ab)
         rozdil_uhlu = smer_bod * math.pi / 200 - smer_orientace * math.pi / 200
         smernik_cil = smernik_ori + rozdil_uhlu
    
         souradnice_x = stanovisko_x + delka * math.cos(smernik_cil)  # zmena zde
         souradnice_y = stanovisko_y + delka * math.sin(smernik_cil)  # zmena zde
    
         return souradnice_y, souradnice_x
      
      b4001_y = 924.341
      b4001_x = 964.774
      orientace_y = 945.908
      orientace_x = 924.919

      rajon(b4001_y, b4001_x, orientace_y, orientace_x, 12.3456, 83.2836, 33.331)
Zdroj: PyScript: Python ve webovém prohlížeči + PyScript: Python ve webovém prohlížeči (dokončení) na portálu root.cz