Xref: utzoo sci.math:10180 sci.math.num-analysis:596 comp.theory:423 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uwvax!daffy!rt8.cs.wisc.edu!toddl From: toddl@rt8.cs.wisc.edu (Todd Lehman) Newsgroups: sci.math,sci.math.num-analysis,comp.theory Subject: Cardioid problems Message-ID: <4404@daffy.cs.wisc.edu> Date: 6 Mar 90 21:35:23 GMT Sender: news@daffy.cs.wisc.edu Organization: U of Wisconsin CS Dept Lines: 38 Hello, I'm stuck on a problem involving cardioids. Maybe someone can help me out... Does anyone know of a easy way to test whether a point (x,y) in the Euclidean plane is in the interior of a cardioid? The cardioid I'm considering is r = sin^2 (t/2), where t is an angle in radians and r is the radius associated with that angle. Points (x,y) and (r;t) are related by x = r cos(t) y = r sin(t) as (x,y) are Euclidean coordinates and (r;t) are polar coordinates. One way of performing the test is to get the argument t from the arctangent of y/x, divide this by two, take the sine of that and square it twice, then see whether the resulting number is less than or equal to x^2+y^2. But this involves four multiplies, two divides, a sine, and an arctangent. :-( In a related problem, to check whether a point (x,y) is inside a circle r = c, for some constant c, one need only test whether x^2+y^2 < c^2. This process involves only two multiplies (c^2 is a constant). :-) The test for the circle is quite simple. Surely there must be a similarly simple test for the cardioid...? Any would be much appreciated. __________ Todd S. Lehman, UW-Madison toddl%garfield@cs.wisc.edu