sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

Create a complex_plot3d function. #24335

Open 7822f248-ba56-45f1-ab3d-4de7482bdf9f opened 6 years ago

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 6 years ago

[ Inspired by this ask.sagemath question ]

The complex_plot function allows us to plot a complex function, using brightness (a. k. a. hue) to represent the modulus and color (a. k. a. value) to represent this argument. This is in fact an (over-) simplified version of domain coloring.

This representation is hard to use for functions with a large range of modules : zeroes (i. e. black spots) are quite hard to pinpoint in a dark background (happens when the function is continuous at its zeroes), poles (i. e. white spots) are usually indistinguishable from a bight and light environment. Furthermore, people with color vision impairment may have these problems worsened for them.

A popular representation of complex function is to use a 3D plot, using z to represent the modulus of f(x+I*y), using color to represent the argument ; this is, for example, the representation used by the Digital Library of Mathematica Functions, a. k. a. Abramowitz and Stegun on the Web, which also defines a specific mapping of argument to color aiming at easing the interpretation of the graphs.

Using some undocumented features of our 3D plotting infrastructure (see #24331), creating such a 3D-plot of a complex function is almost trivial (poles need special handling). The trick is to do if fast...

In order to avoid to loose these functions at the next upgrade of our 3D infrastructure, we depend on the documentation of these features.

Depends on #24331

Component: graphics

Issue created by migration from https://trac.sagemath.org/ticket/24335

7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,5 @@
+[ Inspired by this  ask.sagemath [question](https://ask.sagemath.org/question/39936/how-to-visualise-complex-functions-on-a-disk/) ]
+
 The `complex_plot` function allows us to plot a complex function, using brightness (a. k. a. `hue`) to represent the modulus and color (a. k. a. `value`) to represent this argument. This is in fact an (over-) simplified version of [domain coloring](https://en.wikipedia.org/wiki/Domain_coloring).

 This representation is hard to use for functions with a large range of modules : zeroes (i. e. black spots) are quite hard to pinpoint in a dark background (happens when the function is continuous at its zeroes), poles (i. e. white spots) are usually indistinguishable from a bight and light environment. Furthermore, people with color vision impairment may have these problems worsened for them.
7822f248-ba56-45f1-ab3d-4de7482bdf9f commented 6 years ago

Description changed:

--- 
+++ 
@@ -4,7 +4,7 @@

 This representation is hard to use for functions with a large range of modules : zeroes (i. e. black spots) are quite hard to pinpoint in a dark background (happens when the function is continuous at its zeroes), poles (i. e. white spots) are usually indistinguishable from a bight and light environment. Furthermore, people with color vision impairment may have these problems worsened for them.

-A popular representation of complex function is to use a 3D plot, using `z` to represent the modulus of `f(x+I*y)`, using color to represent the argument ; this is, for example, the representation used by the [Digital Library of Mathematica Functions](http://dlmf.nist.gov/), a. k. a. Abrahamowitz and Stegun on the Web, which also defines a specific [mapping](http://dlmf.nist.gov/help/vrml/aboutcolor) of argument to color aiming at easing the interpretation of the graphs.
+A popular representation of complex function is to use a 3D plot, using `z` to represent the modulus of `f(x+I*y)`, using color to represent the argument ; this is, for example, the representation used by the [Digital Library of Mathematica Functions](http://dlmf.nist.gov/), a. k. a. Abramowitz and Stegun on the Web, which also defines a specific [mapping](http://dlmf.nist.gov/help/vrml/aboutcolor) of argument to color aiming at easing the interpretation of the graphs.

 Using some *undocumented* features of our 3D plotting infrastructure (see #24331), creating such a 3D-plot of a complex function is almost trivial (poles need special handling). The trick is to do if fast...