cad2025 電腦輔助設計與實習

  • Home
    • SMap
    • reveal
    • blog
  • About
    • Mind-Map
    • AI
      • Teams
      • Prompts
    • Homework
      • HW2
      • Plotter
  • Topics
    • Network
    • ICMP
    • IPv6
    • DNS
    • Proxy
    • Web
      • Codespaces
  • Software
    • Git
    • CMSiMDE
      • Flask
    • Solvespace
      • Compile
    • NX2312
      • License
    • Onshape
    • Webots
      • Fourbar
      • TimeStep
      • Clouds
      • Talks
      • Blender
      • Ardupilot
  • Tutorial
    • Stage1
      • Tutorial1
      • Tutorial2
    • Stage2
      • Tutorial3
      • Distancesensor
      • Tutorial4
      • Tutorial5
    • Stage3
      • Tutorial6
      • Tutorial7
      • Stream
      • Webots Server
  • Projects
    • Control
    • Printer
    • Otto
    • Otto_ninja-1
      • Simplify
    • OpenDuck
    • Pupper
    • JetAcker
  • Brython
  • Ref
    • Reeborg
      • ex1
      • Otto_ninja-2
    • Pyodide
    • Pyodide_ex
    • Pyodide2
      • robot.py
      • Example2
    • Pyodide3
      • png_files
      • Harvest
png_files << Previous

Harvest

Pyodide3 在頁面中導入 robot_w_world.py 後,可以透過 pyodide3_harvest_ex1.py 繼承 robot 物件,加入農作物採收功能。

但因為 robot_w_world.py 版本中的 trace 繪製圖層並未獨立,除了採收農作物之後的座標背景會從 pale_grass.png 置換為 grass.png 外,農作物採收後的座標畫面刷新會一併將之前的機器人行走路徑刪除,因此後續版本必須將所有不同屬性的圖像,以各自的獨立圖層進行繪製,才不會互相影響下,產生錯誤的機器人農作物採收模擬。

在 Pyodide3 執行 pyodide3_harvest_ex1.py,執行結果。


png_files << Previous

Copyright © All rights reserved | This template is made with by Colorlib