The sweeper will show a modern industrial model

It is understood that most companies are still using manual cleaning methods that are not compatible with their high degree of mechanization. Not only factory areas, warehouse areas, dock yards, campuses, roads, but also some warehouses for food, medicine, electronic products, precision instruments, etc. that have almost stringent hygiene requirements, are also using brooms to move garbage, and dust still remains on the site. The sweeper is a new type of road sweeper. It does not require brushes or water sprays. It operates entirely with airflow. It relies on the principle of aerodynamics. It uses airflow entirely, does not require brushes or water sprays, and does not raise dust once or twice. The widespread use of dry sweepers will greatly reduce the content of inhalable particulate matter in the air, and completely solve the problem of serious dust pollution. It is an environmentally friendly, energy-saving, modern new sanitation product. The environmental protection technical indicators of this product are higher than the national industry standards. High-quality sweepers just solve this problem.

  • 12
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
import pygame import math from pygame.sprite import Sprite class Robot(Sprite): def __init__(self, screen): # initialize robot and its location 初始化机器人及其位置 self.screen = screen # load image and get rectangle 加载图像并获取矩形 self.image = pygame.image.load('images/robot.png').convert_alpha() self.rect = self.image.get_rect() self.screen_rect = screen.get_rect() # put sweeper on the center of window 把扫地机器人放在界面中央 self.rect.center = self.screen_rect.center # 初始角度 self.angle = 0 self.moving_speed = [1, 1] self.moving_pos = [self.rect.centerx, self.rect.centery] self.moving_right = False self.moving_left = False def blitme(self): # buld the sweeper at the specific location 把扫地机器人放在特定的位置 self.screen.blit(self.image, self.rect) def update(self, new_robot): # 旋转图片(注意:这里要搞一个新变量,存储旋转后的图片) new_robot.image = pygame.transform.rotate(self.image, self.angle) # 校正旋转图片的中心点 new_robot.rect = new_robot.image.get_rect(center=self.rect.center) self.moving_pos[0] -= math.sin(self.angle / 180 * math.pi) * self.moving_speed[0] self.moving_pos[1] -= math.cos(self.angle / 180 * math.pi) * self.moving_speed[1] self.rect.centerx = self.moving_pos[0] self.rect.centery = self.moving_pos[1] # 右转的处理 if self.moving_right: self.angle -= 1 if self.angle < -180: self.angle = 360 + self.angle # 左转的处理 if self.moving_left: self.angle += 1 if self.angle > 180: self.angle = self.angle - 360 # 上下边界反弹的处理 if (self.rect.top <= 0 and -90 < self.angle < 90) or ( self.rect.bottom >= self.screen_rect.height and (self.angle > 90 or self.angle < -90)): self.angle = 180 - self.angle # 左右边界反弹的处理 if (self.rect.left <= 0 and 0 < self.angle < 180) or ( self.rect.right >= self.screen_rect.width and (self.angle > 180 or self.angle < 0)): self.angle = - self.angle
07-09

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值