Questions tagged [coordinate-transformation]
Questions relating changing coordinate systems of numerical points and analytical expression including vector fields and vector analysis.
219
questions
66
votes
2
answers
7k
views
Analogue for Maple's dchange - change of variables in differential expressions
Update
Finally in v13.1 the function DSolveChangeVariables is introduced, try it out! DChange in the answer below is still a ...
24
votes
5
answers
5k
views
Plotting an implicit polar equation
Mathematica can use ContourPlot to draw implicit Cartesian equations, but doesn't seem to have a similar function to plot an implicit polar equation, for example
$\...
22
votes
2
answers
967
views
How to find the conformal mapping between two regions
As the Riemann Mapping Theorem, if both regions are simply connected regions, there must be a unique one-conformal mapping such that the points between the two regions correspond one-to-one. Can we ...
17
votes
1
answer
2k
views
How can I define or use a new coordinate system?
I want to use the dipole coordinate system as defined in this paper: http://arxiv.org/abs/physics/0606044
I see that Mathematica can do all kinds of vector analysis using different kinds of ...
16
votes
2
answers
6k
views
Application of the projection matrix: Removing perspective distortion
I know that there are many posts about image treatment, but I still have trouble with this little challegene.
Baisically I want to remove the perspective distorsion form this image:
(source: http://...
14
votes
2
answers
613
views
Extracting data from analog screen photograph
I'm using an analog profilometer from the 1970s and need a way to digitize the data and the only way is through a photograph.
I've searched but all I could find was how to extract data from computer ...
13
votes
3
answers
1k
views
Coordinate system transformation problem (about Euler angle)
This question comes from the work that constructing the general cylinder by the NURBS. I have implemented the point-set $P_1,P_2,\cdots,P_n$ that in the $O-xyz$ plane, now I want to implement the ...
13
votes
1
answer
1k
views
Compose many Geometric Transformations for 3D Graphics
I'm struggling to understand what would be a good way to compose several geometrical transformations to create a single TransformationFunction to be applied to a <...
13
votes
1
answer
319
views
Lens on a map. Realistic imitation of magnifying glass on images with text and other small features
UPDATE: Code from this post was used for video generation here:
Cinematically moving a lens over images: magnifying glass effect in videos
I am trying to create a magnifying glass effect for images ...
13
votes
1
answer
3k
views
ImageTransformation: polar to cartesian
I am working on something that requires the polar transformation of some images. I implemented this transformation with ImageTransformation:
...
11
votes
5
answers
6k
views
Polar contour plot in Mathematica?
I am following a text on fluid mechanics with MAPLE examples.
I want to do the following ContourPlot in Mathematica in Polar coordinates:
$$ (r^2-\frac{a^3}{r}) \...
11
votes
2
answers
2k
views
Mapping data on Archimedes' spiral
I would like to map my data on Archimedes' spiral and preserve the distance between points on the curve.
The test data consists of 20 evenly spaced {x,y} ...
10
votes
3
answers
720
views
Error in TransformedField
I am using TransformedField to convert a system of ODEs from Cartesian to polar coordinates:
...
10
votes
3
answers
2k
views
Using Grad, Div, etc in polar coordinates
I'm trying to use the newish functions Grad and Div to work with a PDE with circular or spherical symmetry and getting what looks to me like a wrong result. However, I'm not sure of this--perhaps I ...
10
votes
1
answer
277
views
Non-rectilinear integration of InterpolatingFunction
Bug introduced in 7 or earlier and persisting through 11.0.1 or later
[CASE:3487737]
I have a 2-d array that I would like to resample into a different coordinate system and integrate along one of ...
9
votes
4
answers
1k
views
Plotting in polar coordinates, simple implicit curves
How can I plot $\theta=\cos r$ in polar plane? Of course I know that it is different from $r=\cos \theta.$
9
votes
1
answer
422
views
Better replacement rules to perform this change of variables?
In cosmology, it is common to work with both a normal (a.k.a. “cosmic”) time variable t and a “conformal” time variable τ, which ...
9
votes
1
answer
192
views
ImageForwardTransformation produces strange artifacts
I am trying to manipulate an image in equirectangular projection with ImageForwardTransformation. I want to change the projection's inclination to the ecliptic. For ...
8
votes
2
answers
2k
views
How to plot a sphere with Cartesian coordinate axes?
I use this code:
ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]
But I can not to see the coordinate axes inside the sphere like the ...
8
votes
3
answers
689
views
Tensor transformation
Consider the following tensor in coordinate basis
$T=T^{\mu}_{\nu\lambda} \partial_{\mu}\otimes dx^\nu \otimes dx^\lambda$
in two dimensions with coordinates $x^1 = x$ and $x^2 = y$. We take $T^{\mu}...
8
votes
2
answers
651
views
How can I output the coordinates of a city in coordinates of the Mercator projection?
On Mathematica version 8, I would like to use CountryData and CityData to mark Paris on a polygon map of France in the Mercator ...
8
votes
1
answer
11k
views
How to Make a change of variables
I have the following expresion
$$\hat{M}^2=-\left[\frac{1}{\sin\beta}\frac{\partial}{\partial\beta}\sin\beta\frac{\partial}{\partial\beta}+\frac{1}{sin^2\beta}\left(\frac{\partial^2}{\partial\alpha^2}...
8
votes
1
answer
735
views
Integrating Hamilton's equations for the Schwarzschild metric
Part 1
I am trying to integrate Hamiltons equations for the Schwarzschild geometry using NDSolve, these equations must all be integrated simultaneously and are nice ODE's.
A similar task is done in ...
7
votes
3
answers
816
views
Integrate to calculate enclosed area
I am trying to 'use an integral in polar coordinates to calculate the area enclosed by this curve':
The curve is: $r=\sin 2\theta$, $\theta \in [0, \pi]$ which I believe is already in polar form.
I ...
7
votes
2
answers
793
views
Calculating the volume of a sphere after switching to spherical coordinates?
I used the code in the second answer on this page to switch from Cartesian to Spherical coordinates and integrate a function over the sphere. I would like to use this code to calculate the volume of a ...
7
votes
2
answers
1k
views
Cylindrical coordinates in FEM
I am trying to solve the Stokes equation for fluid flow in a 3d cylinder. All boundaries are no-slip, apart from the top boundary, which enforces flow in the x-direction.
My problem is that I can't ...
6
votes
3
answers
493
views
ListDensityPlot in Polar coordinates with a higher efficiency
I have data like this
f[r,theta]
and cells number are about 600*600 (uniform mesh)
The original data has the property of uniform mesh for ...
6
votes
2
answers
7k
views
How to make Mathematica use the chain rule?
Lets say I have the following PDE:
$$x^2 u_{xx} - u_{yy} + u_y = 0$$
And I have the following change of variables:
$$ s(x,y) = x e^y \, \, \, , \, \, t(x,y) = x e^{-y}$$
How can I use Mathematica ...
6
votes
1
answer
953
views
How to apply a transformation to a grid?
I would like to apply a coordinate transformation, visualised as an action on a two-dimensional grid like
The particular example above is
$$x^\mu \mapsto \frac{x^\mu - b^\mu x^2}{1-b\cdot x+ b^2 x^2}....
6
votes
1
answer
2k
views
Map points on a square onto a Torus
I would like to create a 3D torus plot from a 2D graphic. This 2D original plot is a bit complex, and I haven't a clue how could transform it to a torus.
The below code, from this article posted on ...
6
votes
0
answers
365
views
Anamorphic projection onto the corner of a room
I want to use a router to carve anamorphic projections of polyhedron wireframes onto two adjacent walls of my office. Like this:
In order to do this I need to transfer the positions of the vertices ...
6
votes
0
answers
93
views
RegionPlot of TransformedRegion still broken in Mathematica 11? [duplicate]
This question confirms that RegionPlot of a TransformedRegion is broken in version 10. One year later, is this problem still ...
5
votes
2
answers
857
views
Find a right angled triangle
If I am given 10 points in the coordinate system in the for (x,y); where x is the x-coordinate and ...
5
votes
2
answers
557
views
Removing anomalous points from data
I have two sets of 2d-data points which can be transformed in each other by using a certain transformation function.
The problem is that in both data sets there are points which do not have ...
5
votes
2
answers
932
views
Parametric plotting coordinate transformation
We were required, for a project, to plot surfaces of constant u, v, and z (and a sample of arbitrary 'a') of the bipolar cylindrical coordinates. (http://mathworld.wolfram.com/BipolarCoordinates.html)
...
5
votes
2
answers
251
views
Sorting Cartesian coordinates
Here is the problem:
I create a coordinate list as follows:
...
5
votes
1
answer
2k
views
Plot a cone in spherical co-ordinates
As we all know in spherical coordinates a function phi = π/3 gives us a cone. The cone makes an angle of π/3 with the imagined <...
5
votes
2
answers
586
views
On orthographic projection
Writing:
...
5
votes
2
answers
370
views
How do I get actual values from a Jacobian matrix?
I have a Jacobian function:
D[{Sqrt[x^2 + y^2], ArcTan[x, y]}, {{x, y}}]
It gives me a matrix with the formulas I need for my transposition matrix:
...
5
votes
1
answer
659
views
Convert Locator (x,y) values to Lat/Lon as per GetCoordinates on Map
I want to convert the (x,y) coordinates you get from using a locator on a map to Lat/Lon coordinates - exactly like the GetCoordinates tool does when you right click on a map.
...
5
votes
1
answer
188
views
How to reflect from an ellipse while solving a system of differential equations?
While solving a system of differential equations to plot trajectories, we can use NDSolve and WhenEvent like shown here.
I am trying to solve this for a system of equations (Hamiltons Equations) for ...
4
votes
3
answers
2k
views
How to plot a parametric region representing a coordinate transformation
The Wikipedia page on Rindler coordinates shows a nice example of how a coordinate transformation can be represented in a plot.
They start with two coordinates $T,X$ with $0 < X < \infty,\; -X &...
4
votes
3
answers
182
views
Is there an intuitive and rational way to automatically convert ranges into coordinates?
I'm tired of typing and deciphering coordinates of the corners rectangles, and I'm wondering if anyone has found a better way.
A rectangle can simply be described by two lists ...
4
votes
2
answers
332
views
How to do nonlinear substitution?
Suppose, I have an expression. For example:
$$\cos^5(\phi) \sin^3(\theta)$$
And I want to change variables to $(x, y, z)$, knowing that the new variables are related to $\theta$ and $\phi$, via ...
4
votes
3
answers
403
views
Translating Histogram
SeedRandom[1];
RandomVariate[NormalDistribution[], 100];
Histogram[%, Automatic, "Probability"]
The above code produces a histogram like
I want to ...
4
votes
1
answer
112
views
How to create a pin cushion (or barrel) distortion from the square function on Cartesian coordinate?
I want to make a distorted square shape in 2D data set from a rectangular function.
Here is my code to draw a square shape(Field length : 10, Square length: 5, Data num : 101).
...
4
votes
2
answers
125
views
Repeated offset of line along vector and output of point tour
I would like to make a number of copies of a line along a vector (with a specified spacing) and then output a list of points at each end of the line sequenced in a back-and-forth tour. Any help is ...
4
votes
1
answer
188
views
TransformedField on Tensor
I was trying to use the TransformedField function to Transform the Metric Tensor $ds^2 = dx^2 + dy^2 + dz^2$ into Spherical coordinates. So i use:
...
4
votes
1
answer
526
views
Change of coordinates and plots
I want to plot the following
$$L(\rho) = m + \frac{c}{\rho^2}$$
That's very straightforward.
...
4
votes
1
answer
753
views
Why is the range from $-\pi$ to $\pi$ in polar coordinates?
When I run this code
FromPolarCoordinates /@ {{3/2, π/3}, {3/2, (5 π)/3}}
Then I search the documentation of ...