wireframe

How do I reproduce this heart-shaped mesh in MATLAB?

末鹿安然 提交于 2019-11-27 10:36:05
问题 I want to plot a heart shape wireframe as shown in the following image (source): I have tried to make it by using this MATLAB program: n=100; x=linspace(-3,3,n); y=linspace(-3,3,n); z=linspace(-3,3,n); [X,Y,Z]=ndgrid(x,y,z); F=((-(X.^2) .* (Z.^3) -(9/80).*(Y.^2).*(Z.^3)) + ((X.^2) + (9/4).* (Y.^2) + (Z.^2)-1).^3); isosurface(F,0) lighting phong caxis axis equal colormap('flag'); view([55 34]); But I didn't get the desired shape of framework as shown in the figure. I have identified the

python : plotting a wireframe 3D cuboid

ⅰ亾dé卋堺 提交于 2019-11-26 17:11:40
问题 I want to plot 3d cuboid in python. Input : center (3 points for the center) radius (3 radius values, one for each dimension) Ideally it should be a wireframe plot(I need to see whats inside).I am not exactly sure how to go about this. Using python matplotlib or Mayavi is fine. Thanks! So far I have tried the following code ..but that only draws a cube from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np from itertools import product, combinations fig =

3d plot in R - Patch

跟風遠走 提交于 2019-11-26 16:33:05
问题 I have the following data in a data frame: **x** in (0,1) **y** in [0,1] **z** in [0,1] For example: X,Y,Z 0.1, 0.2, 0.56 0.1, 0.3, 0.57 ... I'd like to plot them on this type of chart: I tried on R, but all I could get was a not-so-fancy 3d scatterplot. I also read about the lattice 3d wireframe, but I couldn't get my head around it. What am I supposed to do to get a Matlab like wireframe in R? What data transforms are involved? This is the sample code from the documentation: x <- seq(-pi,