def paint(self, strip: LedStrip): # velocity_based_hue = min(math.pow(abs(self.v) / 2, 2), 0.9) velocity_based_brightness = max(math.pow(abs(self.v) / 2, 2), 0.1) * min(self.ttl / 3, 1) # strip.add_hsv(self.pos - self.radius, self.hue, 1, velocity_based_brightness) strip.add_hsv(self.pos, self.hue, 1, velocity_based_brightness) # strip.add_hsv(self.pos + self.radius, self.hue, 1, velocity_based_brightness) for i, hpos in enumerate(self.hist): strip.add_hsv(hpos, self.hue, 1, 1) # 1/len(self.hist) * i)
def paint(self, strip: LedStrip): strip.add_hsv(self.pos, 0.00, # self.ch, self.cs, self.cv)
def paint(self, strip: LedStrip): strip.add_hsv(self.pos, random.uniform(0,1), #0.33, # self.ch, self.cs, self.cv / 100 )