Ask Your Question
1

How to plot implicit surfaces as scattered points (no interpolation)

asked 2 years ago

moon gravatar image

Hi there, I am failing in plotting as scattered an implicit function. In some posts it is suggested to use point3d however can't see how to that ! This is my basic example:

var('x,y,z,yaxis')
#
ff = 0.28  
hh = 0.07
aa=1
bb=1
dd=1
F=(x^2 + y^2 - 1)^2 + (z -0.5)^2 * ( (y^2/aa^2 + (z + hh)^2 -1)^2 - dd^2 * (1 + bb*(z-0.5)^2) )
r = 2
#Below what I need to work on. 
s=implicit_plot3d(F, (x,-r,r), (y,-r,r), (z,-r,r), plot_points=120, color=mycolor, frame=False)
s.show(viewer='threejs')

Unfortunatyely I'm missing some points to share a picture of the desire. Your help is appreciated.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 2 years ago

rburing gravatar image

updated 2 years ago

This works in principle, but displaying it (each point as a circle!) is slow with high point counts:

s=implicit_plot3d(F, (x,-r,r), (y,-r,r), (z,-r,r), plot_points=15)
s.triangulate()
point3d(s.vertex_list())
Preview: (hide)
link

Comments

Thanks so much. In fact it works however very computation-power consumming especially beacause I'm working to get a high res. good starting tho. Appreciated.

moon gravatar imagemoon ( 2 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2 years ago

Seen: 270 times

Last updated: Oct 14 '22