/usr/share/doc/freefem++/examples/examples++-3d/sphere2.edp is in freefem++-doc 3.19.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | load "msh3"
load "medit"
border BC(t=0,2*pi){ x=cos(t);y=sin(t);label=1;}
mesh TC= buildmesh(BC(100));
func r
= (1e-5+abs(1-square(x)-square(y)))^0.5;
real cc=100;
//TC=adaptmesh(TC,[cc*x/r,0,cc*y/r],IsMetric=1);
plot(TC,wait=1);
mesh3 Thup=movemesh23(TC,transfo=[x,y,sqrt(abs(1-square(x)-square(y)))]);
mesh3 Thdown=movemesh23(TC,transfo=[x,y,-sqrt(abs(1-square(x)-square(y)))]);
verbosity=10;
mesh3 Th= Thup+Thdown;
if(1)
{
medit("Thup",Thup,wait=1);
medit("Thdown",Thdown,wait=1);
medit("Th",Th,wait=1);
}
|