Example #1
0
	def uniformPointInner(self):
		x, y = self.center
		heading, angle, maxDist = self.heading, self.angle, self.radius
		r = random.triangular(0, maxDist, maxDist)
		ha = angle / 2.0
		t = random.uniform(-ha, ha) + (heading + (math.pi / 2))
		return Vector(x + (r * cos(t)), y + (r * sin(t)))
Example #2
0
 def uniformPointInner(self):
     x, y = self.center
     r = random.triangular(0, self.radius, self.radius)
     t = random.uniform(-math.pi, math.pi)
     pt = Vector(x + (r * cos(t)), y + (r * sin(t)))
     return self.orient(pt)