Questions tagged [4d]

4D involves calculations in four dimensions and typically relates to graphics programming. Use the [4d-database] tag for questions about the 4th Dimension database.

From Wikipedia, as of 5 March 2017‎:

In mathematics, four-dimensional ("4D") is a geometric space with four dimensions. It is typically meant to mean four-dimensional Euclidean space, generalizing the rules of three-dimensional Euclidean space. It has been studied by mathematicians and philosophers or over two centuries, both for its own interest and for the insights it offered mathematicians and related fields.

146 questions
0
votes
1 answer

How to get an hypersphere center point out of 5 surface points?

I'm trying to implement a voronoi sampler in 4-dimensional space, which should be a quite simple task, but picking a good starting points distribution, which can sometimes generate some quite skewed voronoi cells due to the lack of uniformity in…
0
votes
3 answers

Split 4-dimensional np.array into 3-dimensional np.arrays by 4th dimension

My apologies if this has been answered elsewhere. I have searched for two days without luck. It seems like a pretty straightforward problem, though I cannot solve it. I have a 4-dimensional numpy array of shape (40, 320, 320, 8). This array is the…
Ben
  • 123
  • 6
0
votes
1 answer

Checking for the intersection of a 4D line segment and a 4D convex polytope

I have two 4D shapes: a polytope composed of two triangles with each side connected to the corresponding side on the other triangle (think triangular prism, but not necessarily straight) and a line segment. I don't need to know where they intersect,…
paper man
  • 488
  • 5
  • 19
0
votes
1 answer

How to plot the fourth variable based on a given x, y and z coordinate framework

I have a numpy array with four columns and several rows. First column is my variable and three others are x, y and z coordinates, respectivly: arr= np.array([[2., 0., 0., 0.], [1., 0., 0., 1.], [2., 0., 1., 0.], …
Ali_d
  • 1,089
  • 9
  • 24
0
votes
0 answers

Reshape a 3D matrix to 4D matrix in MATLAB

I'm trying to reshape a 3D matrix into 4D. I have a 3D matrix e.g. X with dimensions mxnxf. I want a 4D matrix A, with dimensions mxnx8xk, where k=f/8. I've tried the following using mat2cell but it gives me the error that arguments must be…
0
votes
1 answer

How do I render a 4D object in openGL utilizing homogenous transforms?

I want to try and make a game that utilises movement through 4D cross sections. I have looked repeatedly, but cannot find any answers that present complete and clear code - the closest i found was [how should i handle (morphing) 4D objects in…
candela
  • 3
  • 2
0
votes
2 answers

4D plot with gnuplot

I have large data set arranged in four column in a file like this # X Y Z f 0 0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0 ... where (x,y,z) is coordinate of each point in 3D mesh (between [0,1] in each direction and each direction…
mehdi_bm
  • 381
  • 1
  • 3
  • 16
0
votes
0 answers

Pass 4D array to lstm in keras

I have data(X) with a shape of (451, 4, 2, 9) where sample number = 451, series number in time = 4, height (two series) = 2, width (each series has features) = 9. So I have table 2*9 which is distributed over time. The shape of y is (451, 2, 1). my…
Asma Damani
  • 197
  • 3
  • 11
0
votes
0 answers

Concatenate list of numpy 3d tensors into one 4d tensor?

I have list of 3d numpy arrays of different shapes, e.g. (128, 128, 3). Now I want to combine all those arrays into one single 4d tensor which looks like (N, ?, ?, ?), where N is the number of 3d arrays. How do I achieve this with numpy?
Marie M.
  • 170
  • 1
  • 3
  • 13
0
votes
1 answer

How to represent and read 4D array in Opl Cplex from Excel

How can I represent and read a 4D array from Excel to Opl Cplex? The 3D IBM array link is not helpful, trying to adapt to 4D does not work.
0
votes
0 answers

3D Spherical Polar Plot, with a 4th Dimension Mapped to Another Variable

First, I have found a few threads on this sort of theme, but none of them seem to quite do what I want, or at least I am having a real brain fart in trying to work it out, so I appreciate others input. I have 4 variables that make up a polar plot,…
0
votes
0 answers

How can I add an 2d matrix (aXb) into a 4d tensor (e,a,b,2) from a 3d tensor (e,a,b) with tensorflow?

I have a 3d matrix/tensor, which has the format (1000,250,50) and is an input to my TensorFlow model. The first number/dimension is the sum of my examples (1000). The second is the length (250), and the width is (50). Now I want to add an…
user3352632
  • 617
  • 6
  • 18
0
votes
1 answer

Plotting function with 3 parameters (4d) in R

I want to see how three variables x, y, and z respond to a function f using R. I've searched for R solutions (e.g. rgl using 4d plots) but none seem to allow the input of a function as the fourth variable while allowing manipulation of x, y, and z…
carnecol88
  • 43
  • 1
  • 6
0
votes
1 answer

Match 3D vector within 4D array by interpolation?

I've been trying something new for the sake of learning. I'm trying to get a wavelength from a sRGB. I have all the sRGB to XYZ conversion and a conversion table from XYZ to wavelength - 4dimensional. My problem remains in the last line - which…
Moltenhead
  • 63
  • 1
  • 8
0
votes
1 answer

Two 4D mat mul numpy and should expect output 5D

I want to apply attention weights (5 label) to my convolution with 3 filters, could any help me to do how to apply matmul. Appreciated if you give tensorflow version as well. import numpy as np conv = np.random.randint(10,size=[1,3,2,2], dtype=int)…
user1531248
  • 521
  • 1
  • 5
  • 17