Don't use this tag. If you have questions about cartesian products (e.g. SQL, Spark, Datatables, heterogeneous tuples), use `cartesian-product` tag. If you have questions about planar geometry / 3D-graphics, use `cartesian-coordinates` tag.
Questions tagged [cartesian]
245 questions
86
votes
9 answers
flip svg coordinate system
Is there a way to flip the SVG coordinate system so that [0,0] is in the lower left instead of the upper left?

Nippysaurus
- 20,110
- 21
- 77
- 129
44
votes
3 answers
Converting longitude/latitude to X/Y coordinate
I created a map using Google Maps API that highlights all Minnesota counties. Basically, I created the county polygons using a set of longitudes/latitudes coordinates. Here's a screenshot of the generated map:-
One of the user requirements is to be…

limc
- 39,366
- 20
- 100
- 145
19
votes
6 answers
Algorithm for arranging Cartesian points
I have few Cartesian points of the form : (x,y)
where x and y both are non-negative integers.
For e.g.
(0,0) , (1,1), (0,1)
I need an algorithm to arrange the above points
in such a way that going from one point to other
changes either x or y…

simplfuzz
- 12,479
- 24
- 84
- 137
15
votes
3 answers
How to fit a 2D ellipse to given points
I would like to fit a 2D array by an elliptic function: (x / a)² + (y / b)² = 1 ----> (and so get the a and b)
And then, be able to replot it on my graph.
I found many examples on internet, but no one with this simple Cartesian equation. I…

Agape Gal'lo
- 687
- 4
- 9
- 23
12
votes
6 answers
Algorithm for placing a grid over a disordered set of points
Given a large set (tens of thousands up to millions) of disordered points represented as 3D Cartesian vectors, what's a good algorithm for making a regular square grid (of user-defined spacing) that encloses all of the points? Some constraints:
The…

tel
- 13,005
- 2
- 44
- 62
10
votes
4 answers
Cartesian product in Dart Language
How can I create Cartesian Product of dynamic number of lists in Dart Language ?
For example I have two lists:
X: [A, B, C]; Y: [W, X, Y, Z]
I want to create lists like this [AW, AX, AY, AZ, BW, BX, BY, BZ, CW, CX, CY, CZ]
Although Python, Java…

Yunus
- 405
- 5
- 18
9
votes
2 answers
Cartesian to polar coordinates
Take a look at the example here: http://www.brianhare.com/physics/so.html
Take a look at console.log where I am using these two main functions:
function distanceBetween2pts(x1, y1, x2, y2) {
console.log("Particle: ("+x1+","+y1+") Mouse:…

ParoX
- 5,685
- 23
- 81
- 152
8
votes
1 answer
R: any function for Cartesian Product of two data frames?
I need to do a cartesian product of two data frames. For example,
A = id weight type
10 20 a
10 30 b
25 10 c
B = date report
2007 y
2008 n
then C would be like after doing cartesian product of…

Feng Chen
- 2,139
- 4
- 33
- 62
8
votes
5 answers
is NATURAL JOIN any better than SELECT FROM WHERE in terms of performance?
Possible Duplicate:
Inner join vs Where
Today I got into a debate with my project manager about Cartesian products. He says a 'natural join' is somehow much better than using 'select from where' because the later cause the db engine to internally…

Ashkan Kh. Nazary
- 21,844
- 13
- 44
- 68
8
votes
5 answers
Quickly generate the cartesian product of a matrix
Let's say I have a matrix x which contains 10 rows and 2 columns. I want to generate a new matrix M that contains each unique pair of rows from x - that is, a new matrix with 55 rows and 4 columns.
E.g.,
x <- matrix (nrow=10, ncol=2, 1:20)
M <-…

Josh Reich
- 6,477
- 5
- 28
- 26
7
votes
1 answer
ENU -> NED frame conversion using quaternions
What I am looking for:
A uniform way to rotate a vector (X, Y, Z) from ENU to NED and vice versa
The same uniform way to rotate a quaternion from ENU to NED and vice versa
It would be appreciated if there can be given a solution in python, but it is…

Tom Vos
- 410
- 1
- 5
- 13
7
votes
3 answers
MPI_Cart_Shift.Corner Neighborhood
I need to create a communicator with cube topology and then select face of the cube, using the MPI_Cart_Shift implemented messaging between processes that are on the brink. For example I am process with rank 0(R0) my neighborhoods are R2, R4,…

Vdovin
- 107
- 2
- 9
7
votes
2 answers
DB cartesian product on same table
I have a one column table with three rows as below:
col1
team1
team2
team3
team4
I want to do a self cartesian join with result as below:
team1, team2
team1, team3
team1, team4
team2, team3
team2, team4
team3, team4

NullPointer
- 241
- 1
- 2
- 7
7
votes
1 answer
Simple scalable SVG graph with cartesian coordinate system
I am totally new to SVG, so please bear with me. I read a lot of articles on the subject, and everyone is pointing to solutions like d3.js, which is, in my opinion, way to complex for the simple task that I have.
I need to make a graph with a…

Ulrik
- 1,131
- 4
- 19
- 37
7
votes
6 answers
Calculating quaternion for transformation between 2 3D cartesian coordinate systems
I have two cartesian coordinate systems with known unit vectors:
System A(x_A,y_A,z_A)
and
System B(x_B,y_B,z_B)
Both systems share the same origin (0,0,0). I'm trying to calculate a quaternion, so that vectors in system B can be expressed in system…

Mo3bius
- 642
- 1
- 8
- 18