Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!drutx!mtuxo!houxm!whuxl!whuxlm!akgua!gatech!seismo!utah-cs!utah-gr!thomas From: thomas@utah-gr.UUCP Newsgroups: net.graphics Subject: Re: plotting on infinite domain Message-ID: <1682@utah-gr.UUCP> Date: Mon, 17-Feb-86 13:25:50 EST Article-I.D.: utah-gr.1682 Posted: Mon Feb 17 13:25:50 1986 Date-Received: Wed, 19-Feb-86 01:04:21 EST References: <325@watmps.UUCP> Reply-To: thomas@utah-gr.UUCP (Spencer W. Thomas) Distribution: net Organization: University of Utah, Salt Lake City Lines: 29 In article <325@watmps.UUCP> rhbartels@watmps.UUCP (Richard Bartels) writes: >I want to be able to plot f(x) for x in the range [-infinity..infinity], >likewise f(x) in [-infinity..infinity] on a square screen. You might think about a "stereographic" projection that maps the plane onto a hemisphere (which you can then project straight down onto the unit circle). Here is a picture: + . + + \ + unit hemisphere + \ + + \+ plane: --------------------------------------------------------------- . is the center of the hemisphere, \ indicates a ray from there to the plane The mapping of a point on the plane to the hemisphere is to project it along a ray from the center of the hemisphere. Algebraically, the point (x,y) goes to the point (x/d, y/d, 1 - 1/d), where d is sqrt(1 + x^2 +y^2). You can then discard the z coordinate (or not even compute it) to get a mapping of the plane onto the circle. If it is important to maintain the rectangular nature of the coordinate plane (as it might be in plotting (x, f(x)), you could also apply the projection in each coordinate independently, so that (x, f(x)) -> ( x / sqrt(1 + x^2), f(x) / sqrt(1 + f(x)^2) ) -- =Spencer ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)