Skip to main content

All Questions

Tagged with
0 votes
1 answer
34 views

Retrieving the indices of the centers with rgl::cylinder3d

I'm drawing a spherical Lissajous curve with rgl::cylinder3d: library(rgl) library(primes) l <- function(m1, m2, alpha = 0) { g <- gcd(m1, m2) t_ <- seq(0, 2*pi/g, length.out = 400L) ...
Stéphane Laurent's user avatar
0 votes
2 answers
58 views

How to match the color of a rgl mesh and the color of a line on this mesh?

When you plot a rgl mesh and a line on the surface on this mesh with the same color, the line is visible: library(rgl) shade3d(cube3d(), color = "cyan") lines3d(rbind(c(-1,-1,-1), c(1,1,-1)),...
Stéphane Laurent's user avatar
1 vote
1 answer
53 views

How to plot a surface z=f(x,y) with a hole?

I want to make a plot similar to the one at left (the goal is to illustrate an interpolation: the plot at right). I did this plot with a constrained Delaunay tessellation (with the delaunay package) ...
Stéphane Laurent's user avatar
1 vote
1 answer
83 views

How to get a dull and shadowed mesh with rgl?

Below are two meshes of the Barth sextic. The first one is obtained with the R package rgl. It is rather shiny and it has almost no shadow. The second one is obtained with the Haskell package OpenGL. ...
Stéphane Laurent's user avatar
1 vote
0 answers
447 views

Segment 3D mesh and extract mesh vertices and landmarks for each segment

Here is my 3D facial mesh and landmarks available from here: library(Rvcg) library(rgl) library(Morpho) #read.fcsv mymesh <- vcgPlyRead("C:\\Users\\Patrick Wen\\Desktop\\mymesh.ply") ...
Patrick's user avatar
  • 1,177
0 votes
2 answers
663 views

Calculate area on 3D surface mesh encolosed by four arbitrary points from coordinate data

I have human facial data as below: library(Rvcg) library(rgl) data(humface) lm <- matrix(c(1.0456182e+001, -3.5877686e+001, 5.0972912e+001, 2.2514189e+001, 8.4171227e+001, 6....
Patrick's user avatar
  • 1,177
0 votes
1 answer
433 views

Decimate 3D surface mesh evenly and preserving bilaterally symmetry

Here is a sample of 3D facial surface mesh. As can been seen from Fig 1 below, the landmarks are bilaterially symmetric. I wish to reduce the number of landmarks. Here face is the coordinates of the ...
Patrick's user avatar
  • 1,177
1 vote
1 answer
621 views

Using R: how to animate multiple 3D objects in single rgl canvas?

I have data where a participant had positional data on each hand: left: right: positional data has pos.x pos.y pos.z at some time t The initial question was about importing OBJ to work with RGL: ...
mshaffer's user avatar
  • 973
1 vote
1 answer
321 views

plot alphashape3d in plotly or ggplot2 for R

I am trying to take a 3d alphashape and plot it using the plotly or the ggplot2 packages in R. Below is an example using R's native plotting package: Torus example library(alphashape3d) T1 <- ...
B. Abell's user avatar
3 votes
2 answers
956 views

How can I import and plot a triangular mesh in R?

I would like to plot my model output in R It is a triangular mesh in the format x1 y1 z1 x2 y2 z2 x3 y3 z3 value Where each row represents a triangle, and I would like to plot these triangles with ...
David LeBauer's user avatar
0 votes
0 answers
451 views

Plot 3d surface map from data frame

I first begin by running the code below to tune a SVM: tunecontrol <- tune.control(nrepeat=5, sampling = "fix",cross=5, performances=T) tune_svm1 <- tune(svm, ...
gtnbz2nyt's user avatar
  • 1,535
2 votes
1 answer
566 views

Can I map an "OBJ" mesh file w/ existing R packages?

Before I get too deep into a rabbit hole full of quicksand, here's a subset of the text in an OBJ file (737 aircraft in this case) v -1.684813 -4.962262 2.184269 v -1.684813 -4.672744 2.090231 v -1....
Carl Witthoft's user avatar