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
3
votes
1 answer
Julia : Cartesian product of multiple arrays
I would like to compute a product iterator using Iterators.jl.
Let's say I have an array of UnitRanges tab with a priori unknown size.
I would like to compute the cartesian product of the elements of tab.
For example if tab length is 2 and tab[1] =…

user3749697
- 41
- 1
- 3
3
votes
4 answers
oracle sql creating combinations same table without repeat
How I can solve this?
I need to eliminate the duplicated of the Cartesian product, of a table with itself.
I thought of using "connect by". Thanks.
create table foo (
num number(2)
);
insert into foo values (1);
insert into foo values (2);
insert…

Marcia Fernández
- 43
- 6
3
votes
3 answers
Generating all possible combinations of strings
I am trying to generate all possible combinations of a string.
e.g. for the list below: a1q5z!H9, b1q5z!H9, c1q5z!H9, d1q5z!H9, a2q5z!H9 ... etc
Rather than make lots of nested loops, I thought I would try something clever with MODULO ... but hit a…

Ruskin
- 5,721
- 4
- 45
- 62
3
votes
1 answer
How-to map process to an Hypercube using MPI_CART
I am trying to implement bitonic sorting using MPI for 2^n processors.
I would like to use an n-dimensional hypercube to do so for convenience. Using MPI_Cart_Create I can create self-organising dimensions. Doing so will maximize efficiency of my…

matdumsa
- 16,005
- 1
- 22
- 18
3
votes
1 answer
Calculate cartesian coordinates of a point on a perpendicular of a line
my math is a bit rusty seeing as how it's been years.
I added a small example graph to make this more clear.
I have 2 points in a cartesian coordinate system. On this line I take a random point, in this example the center. Now I draw the…

Maaike
- 65
- 1
- 6
3
votes
3 answers
3x3 Matrix Rotation in C++
Alright, first off, I know similar questions are all over the web, I have looked at more than I'd care to count, I've been trying to figure it out for almost 3 weeks now (not constantly, just on and off, hoping for a spark of insight).
In the end,…

user2368229
- 150
- 1
- 2
- 7
3
votes
1 answer
Perpendicular Distance from a Point to a line represented by two points
I have a point C(Cx,Cy) and then a line represented by two points A(Ax,Ay) and B(Bx,By).
I need to find the perpendicular distance between the point C and the line represented by AB.
How do I do this in PHP?

lal_bosdi
- 163
- 3
- 13
3
votes
1 answer
Cartesian XY bearing between points .Net
I am looking for a way to calculate the bearing or azimuth (0-360°) of one drawing point, or pixel, or screen coord, to another.
I currently have the distance portion of it, and with maths not being the favourite subject in my schooling days, I am…

MadScientist
- 53
- 1
- 5
3
votes
1 answer
Retrieving the actual 3D coordinates of a point on a triangle that has been flattened to 2 dimensions
This is a bit of a complicated problem, so I'll do my best to break it down into chunks.
I'm writing a 3D Python library for the sake of learning / fun (as opposed to one that I'd intend for others to use). In the system I've developed,…

ashastral
- 2,818
- 1
- 21
- 32
2
votes
0 answers
Are my equations correct? Rotate on sphere from lat/long points A to B, where will point C be?
I’ve written the below python script. The idea is to calculate the new location of point C after you rotate the globe from point A to point B. I first calculate point P, which is the rotation pole. With calculating point P already something goes…

joosthoek
- 173
- 1
- 3
- 9
2
votes
1 answer
Rotating a Rectangle around a Grid To Calculate Players View
I have a player who can rotate and move around a 2D Cartesian grid, I need to calculate where to draw the enemies on screen.
The player should have a certain viewpoint which is the size of the screen in front of the direction the player is facing.…

Joel
- 587
- 1
- 5
- 17
2
votes
1 answer
how to plot polar and cartesian subplot in one plot as shown in picture
I want to generate one plot which is half cartesian and half polar. for e.g. gaussian curve half side in polar format and other half in cartesian format. which is the best way?
I have tried with sharing y axis but not succesful in taking two…

pjain
- 21
- 1
- 3
2
votes
1 answer
Place an HTML element on a Cesium Entity's position
I need to define the location of an html element based on the location of a Cesium entity. I've used the mouse position (Cesium.Cartesian3.clone(movement.endPosition)), which is in window coordinates, as a test and it works. So I need to get the…

Jan-Pieter
- 137
- 2
- 10
2
votes
2 answers
R data.table join two tables and keep all rows
Have DT1, DT2; need to "join" them and keep all rows; the result is DT3. How to achieve it?
require(data.table)
DT1 <- data.table(ID_1 = 1:2, val_1 = 1:2)
DT2 <- data.table(ID_2 = 3:4, val_2 = 3:4)
DT1
DT2
DT3 <- data.table(ID_1 = c(1,1,2,2),…

LeGeniusII
- 900
- 1
- 10
- 28
2
votes
1 answer
SQL:Oracle - Cartesian product - in which case
Reading "Pro Oracle SQL" by Karen Morten, page 9 "FROM clause" says
Joins are processed in the following order
Cross Join
Inner join
Outer join
So does Oracle always create a Cartesian product of the two tables involved in a join whether…

Nocofoolme
- 91
- 8