Cone image refinement

[亡魂溺海] 提交于 2019-12-01 15:22:41

Why has no one suggested to just use the built-in Cone[] primitive?

cone[m_, h_] := {EdgeForm[], Cone[{{0, 0, h}, {0, 0, 0}}, h/m]};

This works fine here (no white spots). Also, it's not a hack or workaround. The purpose of the empty EdgeForm[] is to remove the black outline of the cone base.

I just realized that Cone[] has a solid base, also very visible on the included image. So this is not exactly the same as the original RevolutionPlot version.

You could construct the cone using a Tube with varying radii:

cone[m_, h_] := {CapForm[None], Tube[{{0, 0, 0}, {0, 0, h}}, {0, h/m}]};

You might want to make the spheres a tiny bit smaller:

Sphere[C1, .98 r1], Sphere[C2, .98 r2]

It's a hack, but it avoids the intersection problem.

Alternatively, you can up the PlotPoints on the cone:

PlotPoints -> 100

but that will make the rendering slower.

Edit: Or a combination of these to help with speed and quality.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!