Questions tagged [cartesian]

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.

245 questions
0
votes
1 answer

Calculation area whith Cartesian plane

PHP with GD I built a quadrangle on the Cartesian plane. I measured the 4 sides, result = 100 each (the corners are at 90 degrees). Area calculation formula of Gauss. https://en.wikipedia.org/wiki/Shoelace_formula Area doverebbe be 10,000, but my…
sandra
  • 29
  • 2
0
votes
0 answers

Normalized Vertex to Cartesian

Currently, I am using DirectX 11 to draw a primitive on my screen. Currently the Vertex is in normalized coordinates where the position ranges from -1, -1 to 1, 1. I would like to set up my Vertex to use Cartesian coordinates 0, 800 to 0,…
John
  • 5,942
  • 3
  • 42
  • 79
0
votes
1 answer

Strange behavior of cartesian transformation in scala spark

I am using Cartesian transformation in Scala Spark, and I have a set of 6 coordinates as follow. coord.collect res114: Array[(Float, Float, Float)] = Array( (43.13,-67.331,-18.137), (63.914,-67.078,-16.894), (23.13,-60.341,-28.117), …
Kent Carlevi
  • 133
  • 1
  • 11
0
votes
4 answers

Python cartesian product

I have the following dictionary in Python: {1: [('4', 0.761), ('6', 0.752), ('5', 0.741), ('15', 0.671), ('8', 0.657), ('1', 0.649), ('10', 0.649), ('11', 0.645), ('2', 0.637), ('7', 0.632), ('17',…
M Arias
  • 11
  • 4
0
votes
1 answer

Cartesian product to same table in oracle without duplicate

I have a table and i want to produce a Cartesian of that data with same table itself. TABLE: TEMP_TEST FROM_COL -------------- A B C If I write the below query for Cartesian then…
0
votes
1 answer

javascript: lat/lon, lat1/lon1, bearing, distance to x,y screen coordinates?

how to project a lat/lon hotspot onto an 360x180 degree panorama image? Using javascript? Real data: lat/lon in decimal degrees and altitude in meters: Camera coordinates: 49.994249, 8.66539, 2 Hotspot coordinates: 49.994163, 8.665388, 2 Distance…
0
votes
1 answer

Transition from spherical coordinate system (local) to cartesian

I have got this problem, so there is a set of data as points in the spherical coordinate system - local (not a faithful arrangement of geographic or mathematical)and I'm trying to convert it to a Cartesian system to preview it in any program to draw…
pzima91
  • 1
  • 3
0
votes
0 answers

Shuffling on Spark cartesian product

Assume a problem where I have an RDD X, I calculate the mean m in single a worker node and then I want to calculate X-m to e.g. calculate stdevs. I want this to happen in the cluster, not the driver node i.e. I want m to be distributed. I thought of…
neverlastn
  • 2,164
  • 16
  • 23
0
votes
2 answers

X and Y coordinate loop in java

i am trying to make a for loop that will go through 9 different sets of points and execute them in my main driver with two other classes. I'm pretty stuck at the moment and can't figure out how to get the second (pointC2) to be set before the for…
Cfs0004
  • 85
  • 2
  • 14
0
votes
0 answers

Spark RDD Cartesian tuple index out of range

I'm trying to run a function across the cartesian product of two PySpark DataFrames with: joined = dataframe1.rdd.cartesian(dataframe2.rdd) collected = joined.collect() for tuple in collected: print tuple # new_rdd =…
lukewitmer
  • 1,153
  • 3
  • 11
  • 21
0
votes
2 answers

Cartesian Join SAS Proc SQL

I have two data sets that look like this: data sales; format week date9.; input store $ week date9. sales; cards; A 01JAN2014 200 A 08JAN2014 500 A 22JAN2014 200 B 01JAN2014 100 B 08JAN2014 200 B 15JAN2014 200 ; run; data dates; format…
pyll
  • 1,688
  • 1
  • 26
  • 44
0
votes
1 answer

How can I append records that don't already exist in a table from a cartesian product query?

My current query returns every possible outcome from 2 tables and inserts them into a junction table. My current query looks like this: INSERT INTO tblJunction_Courses_Software ( CourseID, SoftwareID ) SELECT tblCourses.CourseID,…
mARC
  • 3
  • 2
0
votes
1 answer

Cartesian product of numbers in a single list with given number (C#)

I just want to get cartesian product of numbers in a single list with specified number in C#. In below, I gave some examples of actually what I want get to: List numbers = new List() { 0, 1, 2 }; There should be a function to get all…
mrciga
  • 47
  • 8
0
votes
1 answer

Cartesian product SQL

I have searched in other questions but I don't really get how to get the correct amount and not the cartesian product. I have the following table: EGAIT6 EGACAM EGVONO ACC 2477717 -1443,87 41300015 2995 2477717 -2424,75 41300021…
Lily
  • 9
  • 6
0
votes
1 answer

How to convert Cartesian image to Polar image

I use the below code to convert the image in the Polar to the Cartesian. for ii=1:500; for jj=1:500 phase(ii,jj)=((ii-250)^2/1000+(jj-250)^2/1000); end end Cartesian=cos(phase); [imrow,imcol]=size(Cartesian); % choose the center of…