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
3
votes
1 answer

How to interpolate and plot a 4-Dimensional hamburger?

I have solved the heat equation in octave via finite difference and produced the following 3-D plot whose point colors correspond to the temperatures in each element of my three dimensional hamburger. My computational resources limit the resolution…
3
votes
1 answer

Improve surface plot visualisation of scatter points

I want to visualize 4 vectors of scattered data with a surface plot. 3 vectors should be the coordinates. In addition the 4th vector should represent a surface color. My first approach was to plot this data (xk,yk,zk,ck) using scatHand =…
Matthias La
  • 275
  • 1
  • 13
2
votes
1 answer

4 dimensional Hidden Surface Removal

I'm trying to program a little 4d game. I use C++ and OpenGL. This website brings a good explanation on how to enhance 4d images: http://eusebeia.dyndns.org/4d/vis/07-hsr.html#Enhancing_4D_Projection_Images they tell to apply a 4d Hidden Surface…
Pella86
  • 500
  • 3
  • 10
  • 18
2
votes
0 answers

How do I construct a piecewise polynomial (cubic spline) for 4D data in MATLAB?

I have a problem in which I have to interpolate 4D data d = f(a, b, c) often, because the interpolation happens within an optimisation routine. Now, at first I programmed this using Matlab's interpn function. However, the program obviously became…
Sam
  • 305
  • 1
  • 8
2
votes
3 answers

How to add the indices (x,y) of array elements (u,v) to get an array of elements (x,y,u,v)?

I wrote a function that adds the indices of each element in the array to the elements. Examples: First element is [10,11], index is [0,0] -> Becomes [0,0,10,11] Second element is [12,13], index is [1,0] -> Becomes [1,0,12,13] How can I optimize…
Honey Gourami
  • 150
  • 11
2
votes
0 answers

interpolate v from irregular x,y,z points in R

I am trying to use R to interpolate a response value v from irregularly placed 3-dimensional treatments x, y, z. In this case, I have 50 unique 3-dimensional points (treatments in my experiment), and one response variable. I have one value of v for…
Jake L
  • 987
  • 9
  • 21
2
votes
1 answer

connecting points in n-dimensional hyper cube

I am experimenting with creating 3d like sketches in processing without using the p3d renderer. I have managed to make a cube but for it I hardcoded all the coordinates and connections and once you want to add another dimension it begins to get a…
2
votes
2 answers

Making a 4D plot in R with different x, y, z colors and lengths

I have a 30 x 16 x 9 matrix that I would like to visualize via a 4-D plot in R. I have tried scatter3D() in packages plot3d and scatterplot3d. x <- seq(10, 300, 10) y <- seq(5.0, 20.0, 1.0) z <- c(seq(0.5, 4, 0.5), 10) …
harmony
  • 111
  • 1
  • 9
2
votes
1 answer

How to plot contour lines on a surface plot? (4D)

I would like to make a 4d plot, where you have X, Y, Z (as a surface) and C (displayed as contours on that surface). What I have right now: What I would like to have: I suspect the answer will be some trick with facecolors or countourf3d but I…
leermeester
  • 365
  • 3
  • 19
2
votes
1 answer

convert 4D .nii file to .png

I have a 4D .nii file like "filtered_func_data.nii" from: [https://nifti.nimh.nih.gov/nifti-1/data] By loading the data and access the img field: S = load_nii('filtered_func_data.nii') S = hdr: [1x1 struct] filetype: 2 fileprefix:…
user1603454
  • 99
  • 1
  • 8
2
votes
2 answers

Gnuplot: How to plot heat maps on three coordinate facets to visualize 4D data

I am new to Gnuplot and unfortunately have to start with a (for me) nontrivial problem. I have X-Y-Z-Temperature data. So I have for every spatial coordinate a temperature value. This comes somewhat…
Toby
  • 31
  • 2
2
votes
1 answer

Changing Facecolors in four dimensional matplotlib surface

I'd like to draw a matplotlib surface plot with 4 dimensions. Originally, I would have the data in: [(X, Y, Z, P)] So I'd like to have a 3D Surface, but with a colormap, that is represented by the values of P. I saw an quite good solution for my…
R. Steigmeier
  • 332
  • 2
  • 8
2
votes
1 answer

4D matrix operations in Matlab

I have a set of 4D matrices in Matlab. The first three dimensions are spatial, the last is temporal. That means each voxel is a time series. If Img is the 4D image, Img(x,y,z,:) is the time series of voxel with coordinate (x,y,z). Now I want to…
machinery
  • 5,972
  • 12
  • 67
  • 118
2
votes
1 answer

Simplifying a four-dimensional rule table in Matlab: addressing rows and columns of each dimension

I'm currently trying to automatically generate a set of fuzzy rules for a set of observations which contain four values for each observation, where each observation will correspond to a state (a good example is with Fisher's Iris Data). In Matlab I…
Cate
  • 21
  • 2
2
votes
1 answer

How to plot 4D contour lines (XYZ-V) in MATLAB?

I have dataset of XYZ as the coordinates and V as the value at each point (100x4 matrix). I plot the 3D surface using patch. (by faces & vertices) How can I plot the contour lines of V (NOT Z) over the 3D surface !? ( The Contour3 function plots 3D…
Omid1989
  • 121
  • 1
  • 5
  • 13
1
2
3
9 10