Empty contour3d plot of Mesh

raman_kumar
Thu, 14 Aug 2025 14:25:31 +0000
Visualization

I want to get 3d contour plot of V values but i got empty plot. Here r, θ and ϕ are in spherical coordinates. I convert them to Cartessian coordinates X,Y and Z.

using GLMakie
f= Figure(size = (1000, 800))
ax = Axis3(f[1, 1])

r = Float32[1.1222988, 1.1678005, 1.215147, 1.2644131, 1.3156766, 1.3690186, 1.424523, 1.482278, 1.5423744, 1.6049074, 1.6699756, 1.737682, 1.8081334, 1.881441, 1.9577209, 2.0370934, 2.119684, 2.205623, 2.295046, 2.388095, 2.4849162, 2.585663]
θ = Float32[0.024543693, 0.07363108, 0.12271846, 0.17180584]
ϕ = Float32[0.09817477, 0.2945243, 0.49087384, 0.6872234, 0.88357294, 1.0799224, 1.276272, 1.4726216, 1.6689711, 1.8653207, 2.06167, 2.2580197, 2.4543693, 2.6507187, 2.8470683, 3.043418]
V = Float32[-0.69034183 -0.5812491 -0.5463775 -0.5309071; -0.53076553 -0.46332872 -0.45852184 -0.4686342; -0.66823494 -0.51572204 -0.5321962 -0.5264232; -1.0561714 -0.8288902 -0.60859233 -0.57899064; -0.6616666 -0.6044621 -0.587486 -0.59777194; -0.60119164 -0.5922291 -0.593999 -0.6259617; -0.5891404 -0.59078604 -0.6139868 -0.6520731; -0.60135365 -0.6018314 -0.6343939 -0.68387634; -0.607152 -0.62115747 -0.66636693 -0.72560906; -0.61785805 -0.63913625 -0.6875504 -0.743035; -0.62913656 -0.65838975 -0.7129132 -0.773966; -0.6486452 -0.677318 -0.7351051 -0.8042377; -0.6700401 -0.7028173 -0.7637351 -0.83895963; -0.7040976 -0.7301931 -0.79424965 -0.8772744; -0.72734314 -0.7529979 -0.81782305 -0.9153984; -0.74978787 -0.7796933 -0.8480151 -0.94364434; -0.7727382 -0.80185515 -0.86581784 -0.9666748; -0.7962414 -0.821895 -0.88948035 -0.99751496; -0.80454123 -0.83677214 -0.9175778 -1.0357592; -0.81611246 -0.85279 -0.9443817 -1.0694196; -0.8313097 -0.8688939 -0.9707373 -1.1081561; -0.85325855 -0.8881257 -0.9856331 -1.1410464;;; -0.68617505 -0.58702517 -0.5444199 -0.5222486; -0.56768084 -0.47267213 -0.45887688 -0.46807; -0.68263745 -0.5139875 -0.53030306 -0.5254176; -1.0653019 -0.83015144 -0.6058898 -0.5767219; -0.6819711 -0.6111627 -0.58302915 -0.5949814; -0.61145556 -0.5868021 -0.5868135 -0.62038094; -0.59545124 -0.59136236 -0.6060216 -0.646924; -0.6096375 -0.60193825 -0.6261442 -0.67361885; -0.6104521 -0.621647 -0.6625231 -0.71598125; -0.6150077 -0.6317872 -0.67825806 -0.7389396; -0.62473166 -0.65322316 -0.70702255 -0.769702; -0.6458659 -0.67817277 -0.73786753 -0.80777276; -0.66978073 -0.70077425 -0.75832415 -0.8322303; -0.7036874 -0.7283276 -0.7906295 -0.8731241; -0.7297111 -0.7546109 -0.8168154 -0.9045833; -0.7514063 -0.77855366 -0.8426994 -0.93526214; -0.78024024 -0.80602634 -0.8710507 -0.96897465; -0.8046665 -0.82752997 -0.8877339 -0.99295133; -0.8159926 -0.8428475 -0.9155914 -1.0268998; -0.83295673 -0.86451334 -0.9446947 -1.0653918; -0.8451391 -0.87767726 -0.9672395 -1.0977116; -0.87419015 -0.90210986 -0.9965686 -1.1289546;;; -0.678311 -0.59118026 -0.5436596 -0.51522213; -0.62073493 -0.4912733 -0.46468177 -0.46910423; -0.7106646 -0.5087751 -0.52876085 -0.5213909; -1.0652853 -0.8081587 -0.6019561 -0.57843614; -0.71221095 -0.6506244 -0.58114594 -0.5905913; -0.6199264 -0.5808986 -0.58468294 -0.6197646; -0.60510844 -0.59095025 -0.6038437 -0.6417536; -0.6184278 -0.60629463 -0.6212972 -0.66708416; -0.6172675 -0.62131 -0.6569458 -0.70769614; -0.61438274 -0.631735 -0.6772983 -0.73420656; -0.6251023 -0.64957136 -0.70137703 -0.7684223; -0.6480272 -0.67789316 -0.7348587 -0.8062008; -0.67490375 -0.7038751 -0.7586255 -0.8358043; -0.70990944 -0.73381555 -0.7886373 -0.8672711; -0.7366126 -0.76043385 -0.8203433 -0.9034118; -0.7619593 -0.78698254 -0.8423952 -0.92471683; -0.7910753 -0.81545895 -0.87330645 -0.9641467; -0.8226539 -0.8409928 -0.90040874 -0.9986888; -0.83634794 -0.856107 -0.91860783 -1.0240808; -0.85712254 -0.88458073 -0.9517111 -1.059388; -0.8737388 -0.8986613 -0.9744955 -1.0990657; -0.9029045 -0.9270118 -1.0065262 -1.1185287;;; -0.66594446 -0.5814003 -0.53882235 -0.5119258; -0.69128263 -0.5236122 -0.47993878 -0.47432774; -0.7549272 -0.5126735 -0.5281506 -0.5197632; -1.0611429 -0.72383785 -0.5970441 -0.5746448; -0.74937284 -0.70461035 -0.5829301 -0.58827055; -0.6279112 -0.5793344 -0.58159447 -0.6138062; -0.6168559 -0.59333074 -0.6049608 -0.637799; -0.627865 -0.61098796 -0.62276965 -0.66558874; -0.6259855 -0.6262362 -0.6536742 -0.703592; -0.61891645 -0.6335861 -0.67572725 -0.7294551; -0.6295942 -0.65486336 -0.70486176 -0.7668405; -0.6556104 -0.6813466 -0.7324486 -0.8042564; -0.685822 -0.7104334 -0.76158684 -0.83505744; -0.72207904 -0.7431347 -0.79133135 -0.8650503; -0.7499987 -0.77180946 -0.8215792 -0.89748245; -0.7795899 -0.80042326 -0.8528737 -0.92843276; -0.8118312 -0.8323936 -0.8779908 -0.9571364; -0.8462515 -0.859979 -0.9106876 -0.9977592; -0.8684225 -0.8825209 -0.93727857 -1.029061; -0.89162934 -0.91164976 -0.9606872 -1.0539991; -0.91446745 -0.93417424 -0.995082 -1.0974152; -0.94623214 -0.9633533 -1.0239252 -1.1235979;;; -0.6514094 -0.55916256 -0.5300733 -0.5095135; -0.78285617 -0.56661516 -0.5006429 -0.4825539; -0.8183403 -0.55151683 -0.5314046 -0.5221781; -1.0643216 -0.645902 -0.59264493 -0.57098293; -0.78966606 -0.728997 -0.58534336 -0.5854564; -0.6397897 -0.5782278 -0.581834 -0.6082492; -0.6297339 -0.5987038 -0.6059895 -0.6342548; -0.6378156 -0.618242 -0.629519 -0.6653794; -0.6357796 -0.63079154 -0.65456116 -0.70028424; -0.6279375 -0.6419976 -0.67693627 -0.7327347; -0.63946414 -0.66195977 -0.7064966 -0.76074344; -0.6682491 -0.6916711 -0.73778903 -0.80368054; -0.70343816 -0.7228441 -0.7676975 -0.83425677; -0.74012077 -0.7566387 -0.7973909 -0.86647487; -0.7715287 -0.7892322 -0.82932717 -0.89525336; -0.8038162 -0.82088983 -0.86236525 -0.9296068; -0.8435516 -0.8584414 -0.895266 -0.9636526; -0.87984246 -0.8878568 -0.9242371 -0.9957533; -0.9105681 -0.9195733 -0.9593758 -1.0353742; -0.9393013 -0.9511596 -0.9902053 -1.0646596; -0.96760494 -0.98239195 -1.0244724 -1.1018126; -1.0043958 -1.0166887 -1.0608252 -1.1346554;;; -0.63842756 -0.53254443 -0.5177401 -0.5064487; -0.90382653 -0.61282396 -0.52508694 -0.4925077; -0.88874733 -0.6142901 -0.54138166 -0.5254446; -1.1207306 -0.6452471 -0.6010012 -0.5746703; -0.8267077 -0.7370508 -0.58780855 -0.58115214; -0.6594502 -0.584166 -0.58551013 -0.6064414; -0.6446022 -0.60478455 -0.6074667 -0.6329578; -0.65026873 -0.62879574 -0.63525105 -0.66802794; -0.646868 -0.6383863 -0.6580144 -0.69704926; -0.641249 -0.653257 -0.68059283 -0.73034227; -0.65506476 -0.67617446 -0.7116128 -0.76244056; -0.6875853 -0.7077488 -0.7463799 -0.79887116; -0.72724473 -0.74299407 -0.77971387 -0.8317548; -0.7662791 -0.7770561 -0.8098138 -0.87364525; -0.8006479 -0.81306726 -0.8428577 -0.898112; -0.8377487 -0.8506692 -0.88010126 -0.93213063; -0.884956 -0.89360255 -0.9165513 -0.96966183; -0.92629987 -0.93049955 -0.95327866 -1.005117; -0.9649905 -0.96818227 -0.98941714 -1.0432744; -1.0003313 -1.0063597 -1.0297916 -1.081794; -1.0358676 -1.0444193 -1.0691102 -1.1206027; -1.0771872 -1.0843744 -1.1107845 -1.1595968;;; -0.6312489 -0.50835073 -0.49880508 -0.4992317; -1.0735799 -0.6627111 -0.5478291 -0.50292397; -0.94387674 -0.65868145 -0.5539791 -0.5246164; -1.2774402 -0.69968456 -0.6155779 -0.580309; -0.858817 -0.7286902 -0.5881928 -0.5785838; -0.68961376 -0.59223664 -0.59213835 -0.609878; -0.6627626 -0.61504215 -0.6117812 -0.6302442; -0.6676294 -0.63802695 -0.63864976 -0.66693133; -0.6600847 -0.65156823 -0.6640216 -0.70143914; -0.65976274 -0.66805524 -0.68828607 -0.72759295; -0.67701757 -0.6951318 -0.7216536 -0.7635612; -0.7143077 -0.73022133 -0.75760627 -0.7973149; -0.7585514 -0.769324 -0.79241824 -0.8294597; -0.8015082 -0.8073989 -0.82974505 -0.87373084; -0.8391089 -0.846128 -0.86419076 -0.911857; -0.88319236 -0.890944 -0.9063781 -0.9407719; -0.937328 -0.9399208 -0.9488183 -0.98241097; -0.9866025 -0.98498327 -0.9898823 -1.0209329; -1.032729 -1.0294154 -1.0346131 -1.0643929; -1.0777203 -1.0757653 -1.0798514 -1.1054593; -1.1192427 -1.1183114 -1.1246017 -1.1491008; -1.1655445 -1.1639466 -1.171576 -1.1940104;;; -0.64020914 -0.47984973 -0.47760096 -0.4837664; -1.3330735 -0.7363798 -0.57153946 -0.51670307; -0.9932221 -0.68674934 -0.56880856 -0.52265507; -1.6026008 -0.8664146 -0.6446025 -0.5795903; -0.894412 -0.69464254 -0.5866165 -0.5801996; -0.73150253 -0.6025908 -0.60185426 -0.6113038; -0.6863986 -0.62751436 -0.6177633 -0.63367385; -0.6923132 -0.65054834 -0.64429235 -0.66103584; -0.6779308 -0.66731894 -0.67079526 -0.7003393; -0.68413043 -0.69067544 -0.7012254 -0.7285001; -0.7069296 -0.7198729 -0.7370512 -0.7642815; -0.7492293 -0.7597586 -0.7738576 -0.800907; -0.800015 -0.80328524 -0.80987877 -0.83726585; -0.84765637 -0.8464632 -0.85297984 -0.87173116; -0.8901157 -0.88940316 -0.8945609 -0.9240505; -0.94187534 -0.94148856 -0.94174033 -0.9606559; -1.0041817 -0.9968219 -0.99016905 -1.002978; -1.0624235 -1.0513512 -1.0386562 -1.0460151; -1.1179638 -1.1034535 -1.0879626 -1.0931482; -1.1727765 -1.1571074 -1.1408803 -1.1435056; -1.220727 -1.2067814 -1.1913797 -1.1875141; -1.2718844 -1.2585508 -1.24209 -1.2370473;;; -0.68830246 -0.43967253 -0.45598823 -0.4667256; -1.7461927 -0.8553673 -0.593724 -0.52721864; -1.0792372 -0.7173076 -0.5822805 -0.5251381; -2.2146301 -1.1944963 -0.6803395 -0.5775185; -0.95173764 -0.66320074 -0.5874756 -0.5863695; -0.7896333 -0.6218553 -0.61250705 -0.6131317; -0.720607 -0.6396762 -0.6264651 -0.63880014; -0.7265959 -0.6672494 -0.65446866 -0.6659303; -0.70437574 -0.68593276 -0.6818027 -0.6992615; -0.7164524 -0.7192741 -0.7184939 -0.73167; -0.74638534 -0.75045365 -0.7581876 -0.7685128; -0.7958566 -0.7956864 -0.7921552 -0.8093131; -0.855154 -0.84544235 -0.8349704 -0.84473246; -0.9099486 -0.8924383 -0.8816918 -0.8869826; -0.9589006 -0.94108313 -0.93030065 -0.93634605; -1.0196563 -0.9980974 -0.9834502 -0.9833172; -1.09089 -1.0603312 -1.0388955 -1.0303297; -1.1594933 -1.1232088 -1.0949594 -1.081156; -1.2255394 -1.1845887 -1.1497678 -1.1292734; -1.2904922 -1.2453424 -1.207669 -1.1876686; -1.3443099 -1.3023541 -1.2635155 -1.2352179; -1.4031043 -1.358844 -1.3201239 -1.2858063;;; -0.8209241 -0.43115935 -0.44800574 -0.45582965; -2.3120244 -0.8325224 -0.6040608 -0.5359318; -1.2955464 -0.8902228 -0.607431 -0.5261681; -3.423697 -1.3941242 -0.69987744 -0.58244157; -1.0509937 -0.67034256 -0.5950779 -0.59262294; -0.8705794 -0.6404188 -0.6210707 -0.61816376; -0.77310115 -0.6557045 -0.63694906 -0.6427667; -0.775654 -0.6878635 -0.6696287 -0.6720757; -0.74480873 -0.7084093 -0.698333 -0.70337224; -0.76146835 -0.7498406 -0.7377772 -0.7405907; -0.7999463 -0.7849959 -0.77914554 -0.78086203; -0.8599514 -0.83522785 -0.8182182 -0.8184567; -0.929977 -0.8901327 -0.8674982 -0.8613319; -0.9964857 -0.94168115 -0.9169366 -0.90879107; -1.0531636 -0.99482274 -0.9700593 -0.95951015; -1.1252753 -1.0563992 -1.0288413 -1.0110806; -1.2057862 -1.1248881 -1.0899838 -1.0620675; -1.2854178 -1.1937935 -1.1518468 -1.1197604; -1.3610498 -1.264137 -1.2137885 -1.1717571; -1.4345671 -1.3320041 -1.2769444 -1.2360625; -1.4935919 -1.390572 -1.3333108 -1.2931699; -1.5554779 -1.4521872 -1.3910897 -1.3425893;;; -1.1211979 -0.5087082 -0.46725485 -0.45813984; -3.1553578 -0.7045303 -0.6019868 -0.54485136; -1.8805447 -1.2210206 -0.64933467 -0.5299594; -6.9218626 -1.3509969 -0.7010542 -0.5878818; -1.2131729 -0.7032992 -0.6073267 -0.6011797; -0.98182666 -0.657626 -0.630818 -0.62558293; -0.8488478 -0.6773412 -0.65071905 -0.65097296; -0.84453 -0.7085504 -0.6849305 -0.68052626; -0.8055432 -0.7357526 -0.7187083 -0.7135148; -0.8267312 -0.7782755 -0.76374096 -0.7548781; -0.874724 -0.820492 -0.80126476 -0.7949232; -0.9485988 -0.8738748 -0.8490058 -0.8364508; -1.0311317 -0.93253785 -0.9026896 -0.8865664; -1.1130261 -0.98966867 -0.9565136 -0.9353714; -1.1811736 -1.0475454 -1.0109438 -0.98692656; -1.2638718 -1.1141282 -1.073422 -1.0447137; -1.3524976 -1.1863488 -1.1371698 -1.10192; -1.440638 -1.2593079 -1.203837 -1.1617826; -1.5190277 -1.3351825 -1.2697737 -1.2184515; -1.5896628 -1.4011877 -1.3324361 -1.2801685; -1.6532604 -1.4581664 -1.3882262 -1.3363761; -1.7029089 -1.5157324 -1.4413601 -1.3940104;;; -1.728569 -0.63454926 -0.5139982 -0.48471057; -6.58914 -0.7829194 -0.6201233 -0.5538324; -3.9393852 -1.2805362 -0.6692066 -0.5353176; -98.86271 -1.4033215 -0.71238464 -0.59372395; -1.4613017 -0.7304881 -0.62011576 -0.6077512; -1.1293238 -0.6819021 -0.6414315 -0.63486093; -0.95319873 -0.70431906 -0.6706344 -0.6619131; -0.93466365 -0.7305886 -0.7015755 -0.69503814; -0.8899885 -0.76425564 -0.7370322 -0.7271981; -0.9189265 -0.807076 -0.78635895 -0.7696599; -0.9757129 -0.85572773 -0.8301031 -0.8118255; -1.0642405 -0.9123258 -0.8792641 -0.8624065; -1.1626219 -0.9749173 -0.9370188 -0.91417545; -1.2603682 -1.0372615 -0.99637765 -0.9698348; -1.3453585 -1.1000446 -1.0506613 -1.0182703; -1.434256 -1.1677655 -1.1123573 -1.0763634; -1.5195833 -1.2395597 -1.1780195 -1.1387013; -1.6033651 -1.3079588 -1.2402174 -1.20066; -1.6696486 -1.3813219 -1.3099446 -1.2570807; -1.7160045 -1.4388504 -1.3702496 -1.3207784; -1.7655919 -1.4904063 -1.4174818 -1.3655888; -1.7937493 -1.530639 -1.4616356 -1.4161826;;; -3.0945296 -0.73821497 -0.57361597 -0.5318217; 13.79451 -1.023048 -0.665661 -0.56801075; 26060.367 -1.285416 -0.6749927 -0.5431456; 9.867817 -1.5030078 -0.73495364 -0.6020408; -1.8284036 -0.77149165 -0.63745606 -0.6171816; -1.322746 -0.7089978 -0.6557943 -0.64243704; -1.0916339 -0.7336329 -0.68974966 -0.6760114; -1.0493511 -0.7580758 -0.7210198 -0.71163297; -0.9961631 -0.79292417 -0.7581188 -0.74265206; -1.0399476 -0.83870196 -0.80774575 -0.7891934; -1.1030903 -0.8932187 -0.8583092 -0.8334362; -1.2033534 -0.95070845 -0.9084523 -0.88514763; -1.3172739 -1.0169308 -0.9685344 -0.94031906; -1.4262437 -1.0823318 -1.0323956 -1.0060238; -1.5233252 -1.1476 -1.0863028 -1.0507268; -1.6051594 -1.2098283 -1.1437279 -1.1050091; -1.6638867 -1.2772288 -1.2073178 -1.1643323; -1.718884 -1.332154 -1.2627875 -1.2273278; -1.7563332 -1.3942698 -1.3237869 -1.2828139; -1.7682071 -1.4402786 -1.3819277 -1.3354696; -1.7845292 -1.4832627 -1.424388 -1.3839701; -1.7952688 -1.5126526 -1.4605643 -1.4200473;;; -9.972015 -0.908432 -0.64175177 -0.5881211; 3.4805202 -1.230699 -0.70157665 -0.5802826; 5.520383 -1.3914853 -0.69415724 -0.5521546; 5.3199625 -1.6030698 -0.7585108 -0.61183673; -2.3576486 -0.82816553 -0.6595567 -0.629624; -1.5738041 -0.7454426 -0.67447513 -0.65373397; -1.2665776 -0.76543874 -0.7070766 -0.69030637; -1.188611 -0.79077685 -0.74116045 -0.722616; -1.1173567 -0.82436484 -0.7811953 -0.7600538; -1.1819576 -0.8731946 -0.83288294 -0.811594; -1.246236 -0.93098795 -0.88587654 -0.858854; -1.3496485 -0.9882829 -0.93508774 -0.90932137; -1.4676726 -1.0502585 -0.99671847 -0.9661016; -1.5707114 -1.1150044 -1.0583483 -1.0281056; -1.660223 -1.1775337 -1.1130633 -1.079589; -1.7134186 -1.2311494 -1.1655905 -1.1301558; -1.7283901 -1.2861919 -1.2178109 -1.1825448; -1.7376934 -1.3263209 -1.2679613 -1.2331474; -1.7469971 -1.3778485 -1.3170985 -1.2863244; -1.7332562 -1.4135033 -1.3614466 -1.3281494; -1.7247006 -1.4514148 -1.4108056 -1.3773127; -1.7249101 -1.4784076 -1.4394894 -1.4100796;;; 11.908381 -1.1420461 -0.71744156 -0.62852377; 2.268503 -1.4361361 -0.7229185 -0.5904316; 3.6254237 -1.4640282 -0.7230572 -0.562508; 4.012428 -1.7706518 -0.7886426 -0.62399405; -3.095607 -0.88743484 -0.68469274 -0.6399965; -1.8710133 -0.79014724 -0.6936138 -0.6690398; -1.4631115 -0.8019499 -0.7233577 -0.7009922; -1.3356289 -0.8253549 -0.7623523 -0.7352992; -1.2380393 -0.8570875 -0.8039441 -0.7823216; -1.317825 -0.90651405 -0.8567692 -0.8299932; -1.3748403 -0.96213406 -0.90909445 -0.8826264; -1.4645226 -1.0155618 -0.95732397 -0.9338411; -1.5704898 -1.071347 -1.012774 -0.98784757; -1.6458819 -1.1260611 -1.068086 -1.040653; -1.7047774 -1.1838181 -1.1261607 -1.0951986; -1.7210385 -1.2287639 -1.170576 -1.1414834; -1.6947824 -1.2705604 -1.2146502 -1.1874586; -1.6686066 -1.3032889 -1.254714 -1.2307765; -1.6617961 -1.3433896 -1.2986832 -1.2722578; -1.6441135 -1.3750459 -1.3319508 -1.3111519; -1.6299913 -1.4022886 -1.3725814 -1.3530566; -1.6292545 -1.4368643 -1.4087358 -1.3939711;;; 4.8196745 -1.3739116 -0.7778384 -0.6491959; 1.9975204 -1.5658323 -0.73838323 -0.5965292; 3.298141 -1.5168645 -0.75025785 -0.57852143; 3.6218293 -1.9314708 -0.82406586 -0.6360016; -3.9724348 -0.9511362 -0.70973843 -0.6536807; -2.143795 -0.83414376 -0.7139454 -0.6833161; -1.6330665 -0.8382889 -0.740607 -0.7122579; -1.4485751 -0.8558722 -0.77892613 -0.7524617; -1.3315864 -0.88450533 -0.82198817 -0.7981885; -1.4070334 -0.92852575 -0.8749287 -0.8465572; -1.4479222 -0.9775289 -0.92129636 -0.8981647; -1.5138261 -1.0255375 -0.9715482 -0.95114046; -1.5942115 -1.0742875 -1.0156358 -0.99107736; -1.639703 -1.1249388 -1.0664977 -1.0451577; -1.659583 -1.1707102 -1.1228383 -1.100797; -1.6491323 -1.2121727 -1.1628351 -1.1398033; -1.5987098 -1.2439331 -1.1992935 -1.1760918; -1.5570916 -1.2718781 -1.2352657 -1.2152715; -1.545177 -1.3074074 -1.2711822 -1.2552443; -1.5395525 -1.332325 -1.309879 -1.297358; -1.5299135 -1.3560919 -1.331102 -1.3319521; -1.5382432 -1.388631 -1.3692749 -1.3748088]

Nx, Ny, Nz = length(r), length(θ), length(ϕ)
X, Y, Z = Float32[], Float32[], Float32[]
for i in 1:Nx, j in 1:Ny, k in 1:Nz
    x = r[i] * sin(θ[j]) * cos(ϕ[k])
    y = r[i] * sin(θ[j]) * sin(ϕ[k])
    z = r[i] * cos(θ[j])
    push!(X, x)
    push!(Y, y)
    push!(Z, z)
end
contour3d!(X,Y,Z, levels =V, color=:blue2)
f

7 posts - 3 participants