       Re: extracting points and projecting

• To: mathgroup at smc.vnet.net
• Subject: [mg98127] Re: [mg98099] extracting points and projecting
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Tue, 31 Mar 2009 04:16:12 -0500 (EST)

```g = ContourPlot[Arg[Gamma[x + I*y]] == 0, {x, -10, 10}, {y, -10, 10},
PlotPoints -> 100]

pts = First@Cases[g, x_GraphicsComplex :> First[x]];

j1[x_, y_] := 2 x/(1 + x^2 + y^2)^2;
j2[x_, y_] := 2 y/(1 + x^2 + y^2)^2;
j3[x_, y_] := (-1 + x^2 + y^2)/(1 + x^2 + y^2);

{j1[##], j2[##], j3[##]} & @@@ {{x1, y1}, {x2, y2}, {x3, y3}}

{{(2*x1)/(x1^2 + y1^2 + 1)^2,
(2*y1)/(x1^2 + y1^2 + 1)^2, (x1^2 + y1^2 - 1)/
(x1^2 + y1^2 + 1)},
{(2*x2)/(x2^2 + y2^2 + 1)^2,
(2*y2)/(x2^2 + y2^2 + 1)^2, (x2^2 + y2^2 - 1)/
(x2^2 + y2^2 + 1)},
{(2*x3)/(x3^2 + y3^2 + 1)^2,
(2*y3)/(x3^2 + y3^2 + 1)^2, (x3^2 + y3^2 - 1)/
(x3^2 + y3^2 + 1)}}

pts3D = {j1[##], j2[##], j3[##]} & @@@ pts;

ListPointPlot3D[pts3D, PlotRange -> Full, ImageSize -> 600]

Bob Hanlon

---- Cristina Ballantine <cballant at holycross.edu> wrote:

=============
I would like to extract the points from the following ContourPlot

g=ContourPlot[Arg[Gamma[x + I*y]] == 0, {x, -10, 10}, {y, -10, 10}, PlotPoints -> 100]

I can do this with

pts = First@Cases[g, x_GraphicsComplex :> First[x]]

Then I would like to map this list of points onto the Riemann sphere. The projection is performed through

j1[x_, y_] := 2 x/(1 + x^2 + y^2)^2
j2[x_, y_] := 2 y/(1 + x^2 + y^2)^2
j3[x_, y_] := (-1 + x^2 + y^2)/(1 + x^2 + y^2)

I need to generate a list of three dimensional points (j1[x,y], j2[x,y], j2[x,y]) from pts and plot them. I am unable to generate the list of three dimensional points. Any help is very much appreciated.

Cristina

```

• Prev by Date: Re: extracting points and projecting
• Next by Date: Re: simpler way to get a particular banded matrix?
• Previous by thread: Re: extracting points and projecting
• Next by thread: Image Processing & 3D Graphics Question