Profile cover photo
Profile photo
Abderrahman Taha
154 followers -
Software developer and Math enthusiast
Software developer and Math enthusiast

154 followers
About
Posts

Post has shared content
A quick video to show how to create animated GIF images with MathMod-5.0 and GIMP.
MathMod-5.0 is now available for Windows/Linux/MacOS from :https://sourceforge.net/projects/mathmod/files/MathMod-5.0/
A quick video to show how to create animated GIF images with MathMod-5.0 and GIMP.
MathMod-5.0 is now available for Windows/Linux/MacOS from :https://sourceforge.net/projects/mathmod/files/MathMod-5.0/

Post has attachment
A quick video to show how to create animated GIF images with MathMod-5.0 and GIMP.
MathMod-5.0 is now available for Windows/Linux/MacOS from :https://sourceforge.net/projects/mathmod/files/MathMod-5.0/

Post has attachment
MathMod-5.0 is now available for download from:
https://sourceforge.net/projects/mathmod/files/MathMod-5.0/
MathMod is a mathematical modeling software to visualize and animate implicit and parametric surfaces.
Changelog for MathMod-5.0 (24/05/2017)
1) Add feature to record successive screenshots (frames)
2) Add support for using u and v parameters in solid textures descriptions (for parametric surfaces).
3) Add 32 new scripts for a total of 373 integrated scripts.
4) 14 Videos Tutorials available from MathMod's
FaceBook page: https://www.facebook.com/MathMod-529510253833102/
and Youtube : https://www.youtube.com/channel/UC-NDhd94LLS0KFUdKnloj4w
5) Bug fix and code optimization. For more informations go to: https://sourceforge.net/p/mathmod/branches/commit_browser
Photo

Post has attachment
Straw Basket (implicit surface)
Although the attached scripts generate the same math model, the first one is much more faster to render (3x) because it uses the integrated MathMod function fmesh(x,y,z,A,B,C,D,E) . The second script integrates the whole definition for the fmesh function so you can understand how the five parameters A,B,C,D,E are used in both scripts

MathMod scripts:

{
"Iso3D": {
"Description": ["Straw Basket v02 by Abderrahman Taha 08/05/2017. The mesh formula is from the PovRay team: http://www.povray.org/ "],
"Name": ["Straw Basket_02"],
"Component": ["Straw Basket"],
"Const": ["A = 0.5",
"B = 0.2",
"C = 1",
"D = 0.09",
"E = 1",
"th = pi / A",
"ph = pi/ B"],
"Funct": ["fmesh0=-fmesh(x,y,z,A,B,C,D,E) +0.08 ",
"fmesh1=fmesh0(atan2(y,x),sqrt(x*x+y*y)-4,z,t) ",
"fmesh2= fmesh1(sqrt(x*x+z*z)-7,y,2*atan2(z,x),t)",
"fmesh3= if(atan2(z,sqrt(x*x+y*y))<.9, fmesh0(atan2(y,x),sqrt(x*x+y*y+z*z)-4,atan2(z,sqrt(x*x+y*y)),t), 1)*(atan2(z,sqrt(x*x+y*y))<.9)"],
"Fxyz": [" fmesh3(x,y,z,t)"],
"Xmax": ["5"],
"Xmin": ["-5"],
"Ymax": ["5"],
"Ymin": ["-5"],
"Zmax": ["5"],
"Zmin": ["-5"]
}
}

******
{
"Iso3D": {
"Description": ["Straw Basket v01 by Abderrahman Taha 22/12/2015. The mesh formula is from the PovRay team: http://www.povray.org/ "],
"Name": ["Straw Basket_01"],
"Component": ["Straw Basket"],
"Const": ["A = 0.5",
"B = 0.2",
"C = 1",
"D = 0.09",
"E = 1",
"th = pi / A",
"ph = pi/ B"],
"Funct": ["r = (x % (A * 2))",
"r = abs( if (r(x,y,z,t) < 0, r(x,y,z,t) + A, r(x,y,z,t) - A)) * C",
"r2 = (y - cos(z * ph) * D) * E",
"temp = -sqrt(r2(x,y,z,t) * r2(x,y,z,t) + r(x,y,z,t) * r(x,y,z,t))",
"r = ((x - A) % (A * 2))",
"r = abs(if (r(x,y,z,t) < 0, r(x,y,z,t) + A, r(x,y,z,t) - A)) * C",
"r2 = (y + cos(z * ph) * D) * E",
"temp = max(-sqrt(r2(x,y,z,t) * r2(x,y,z,t) + r(x,y,z,t) * r(x,y,z,t)), temp(x,y,z,t))",
"r = (z % (B * 2))",
"r = abs(if (r(x,y,z,t) < 0, r(x,y,z,t) + B, r(x,y,z,t) - B)) * C",
"r2 = (y + cos(x * th) * D) * E",
"temp = max( -sqrt(r2(x,y,z,t) * r2(x,y,z,t) + r(x,y,z,t) * r(x,y,z,t)), temp(x,y,z,t))",
"r = ((z- B) % (B * 2))",
"r = abs(if (r(x,y,z,t) < 0, r(x,y,z,t) + B, r(x,y,z,t) - B)) * C",
"r2 = (y - cos(x * th) * D) * E",
"fmesh0 = max( -sqrt(r2(x,y,z,t) * r2(x,y,z,t) + r(x,y,z,t) * r(x,y,z,t)), temp(x,y,z,t)) +0.08",
"fmesh0= if(atan2(z,sqrt(x*x+y*y)) < 0.89, fmesh0(atan2(y,x),sqrt(x*x+y*y+z*z) -4,atan2(z,sqrt(x*x+y*y)),t), 1)*(atan2(z,sqrt(x*x+y*y)) < 0.89)"],
"Fxyz": ["fmesh0(x,y,z,t)"],
"Xmax": ["5"],
"Xmin": ["-5"],
"Ymax": ["5"],
"Ymin": ["-5"],
"Zmax": ["5"],
"Zmin": ["-5"]
}
}
Photo

Post has attachment
The script for the "Double Distorsion" animation.
There are six parameters but the most relevant are "k=5" for the number of twists and "k0=4" to set the number of the cylinder sides.
MathMod script
{
"Param3D": {
"Description": ["Double Distorsion by Abderrahman Taha 04/05/2017"],
"Name": ["Double Distorsion"],
"Component": ["Torus"],
"Const": ["k=5",
"k0=4",
"k1=30",
"L=1.5",
"r0=7",
"dv=0.01"],
"Funct": ["Fx = (1+0.5*cos(v+t))cos(u-k(v)+t)",
"Fy = (1+0.5*cos(v+t))sin(u-k(v)+t)",
"Fz= L*sin(v+t)",
"DFxv = ( Fx(u,v+dv,t) - Fx(u,v,t))/dv",
"DFyv = ( Fy(u,v+dv,t) - Fy(u,v,t))/dv",
"DFzv = ( Fz(u,v+dv,t) - Fz(u,v,t))/dv",
"DFxv2 = ( DFxv(u,v+dv,t) - DFxv(u,v,t))/dv",
"DFyv2 = ( DFyv(u,v+dv,t) - DFyv(u,v,t))/dv",
"DFzv2 = ( DFzv(u,v+dv,t) - DFzv(u,v,t))/dv",
"Rapp = (u/sqrt(u*u+v*v+t*t))",
"Nx = Rapp(DFxv2(u,v,t),DFyv2(u,v,t),DFzv2(u,v,t))",
"Ny = Rapp(DFyv2(u,v,t),DFxv2(u,v,t),DFzv2(u,v,t))",
"Nz = Rapp(DFzv2(u,v,t),DFyv2(u,v,t),DFxv2(u,v,t))",
"Bx = 1/sqrt(u*u+v*v+t*t)",
"Binx = (DFyv(u,v,t) * Nz(u,v,t) - DFzv(u,v,t) * Ny(u,v,t))Bx(DFxv(u,v,t), DFyv(u,v,t), DFzv(u,v,t))",
"Biny = (DFzv(u,v,t) * Nx(u,v,t) - DFxv(u,v,t) * Nz(u,v,t))*Bx(DFxv(u,v,t), DFyv(u,v,t), DFzv(u,v,t))",
"Binz = (DFxv(u,v,t) * Ny(u,v,t) - DFyv(u,v,t) * Nx(u,v,t))*Bx(DFxv(u,v,t), DFyv(u,v,t), DFzv(u,v,t))",
"S = (r0/100)((k0-1)cos(u+k1*t) + cos((k0-1)*u+k1*t))",
"C = (r0/100)((k0-1)*sin(u+k1*t) - sin((k0-1)*u+k1*t))",
"Sx = Fx(pi,v,t) + Nx(pi,v,t)*C(u,v,t) + Binx(pi,v,t)*S(u,v,t)",
"Sy = Fy(pi,v,t) + Ny(pi,v,t)*C(u,v,t) + Biny(pi,v,t)*S(u,v,t)",
"Sz = Fz(pi,v,t) + Nz(pi,v,t)*C(u,v,t) + Binz(pi,v,t)*S(u,v,t)"],
"Fx": ["Sx(u,v,t)"],
"Fy": ["Sy(u,v,t)"],
"Fz": ["Sz(u,v,t)"],
"Umax": ["pi"],
"Umin": ["-pi"],
"Vmax": ["2*pi"],
"Vmin": ["0"]
}
}
Photo

Post has attachment
Double distorsion movement with a four-sided closed cylinder. (smaller gif image)
Animated Photo

Post has attachment
Double distorsion movement with a four-sided closed cylinder.
Animated Photo

Post has attachment
Torsion Spring v2
Another version of the Torsion Spring animation.
MathMod script:
{
"Param3D": {
"Description": ["Torsion spring v2 by Abderrahman Taha 01/05/2017"],
"Name": ["Torsion_Spring_02"],
"Component": ["Torus_Section"],
"Const": ["k=7",
"L=1.5",
"r0=12",
"dv=0.01"],
"Funct": ["Fx=(1+0.5*cos(t+v )) * cos(pi-k*(v))",
"Fy=(1+0.5*cos(t+v )) * sin(pi-k*(v))",
"Fz=L*sin(t+v)",
"DFxv = (Fx(u,v+dv,t) - Fx(u,v,t))/dv",
"DFyv = (Fy(u,v+dv,t) - Fy(u,v,t))/dv",
"DFzv = (Fz(u,v+dv,t) - Fz(u,v,t))/dv",
"DFxv2 = (DFxv(u,v+dv,t) - DFxv(u,v,t))/dv",
"DFyv2 = (DFyv(u,v+dv,t) - DFyv(u,v,t))/dv",
"DFzv2 = (DFzv(u,v+dv,t) - DFzv(u,v,t))/dv",
"Rapp = (u/sqrt(u*u+v*v+t*t))",
"Nx = Rapp(DFxv2(u,v,t),DFyv2(u,v,t),DFzv2(u,v,t))",
"Ny = Rapp(DFyv2(u,v,t),DFxv2(u,v,t),DFzv2(u,v,t))",
"Nz = Rapp(DFzv2(u,v,t),DFyv2(u,v,t),DFxv2(u,v,t))",
"Bx = 1/sqrt(u*u+v*v+t*t)",
"Binx = (DFyv(u,v,t) * Nz(u,v,t) - DFzv(u,v,t) * Ny(u,v,t))*Bx(DFxv(u,v,t), DFyv(u,v,t), DFzv(u,v,t))",
"Biny = (DFzv(u,v,t) * Nx(u,v,t) - DFxv(u,v,t) * Nz(u,v,t))*Bx(DFxv(u,v,t), DFyv(u,v,t), DFzv(u,v,t))",
"Binz = (DFxv(u,v,t) * Ny(u,v,t) - DFyv(u,v,t) * Nx(u,v,t))*Bx(DFxv(u,v,t), DFyv(u,v,t), DFzv(u,v,t))",
"Sx = Fx(u,v,t) + (r0/100)*Nx(u,v,t)*cos(u) + (r0/100)*Binx(u,v,t)*sin(u)",
"Sy = Fy(u,v,t) + (r0/100)*Ny(u,v,t)*cos(u) + (r0/100)*Biny(u,v,t)*sin(u)",
"Sz = Fz(u,v,t) + (r0/100)*Nz(u,v,t)*cos(u) + (r0/100)*Binz(u,v,t)*sin(u)"],
"Fx": ["Sx(u,v,t)"],
"Fy": ["Sy(u,v,t)"],
"Fz": ["Sz(u,v,t)"],
"Umax": ["pi"],
"Umin": ["-pi"],
"Vmax": ["2*pi"],
"Vmin": ["0"]
}
}
Animated Photo

Post has attachment
Twin Klein (M = 5)
Animated Photo

Post has attachment
Twin Klein (parametric surface)
The attached script can generate ten (10) "Twin Klein" animations with different protuberances on the surfaces (including the Spiky and Shell like protuberances from my previous published animations).
The parameter M (M=1,..,10) is used to to switch between the different protuberances definitions.
MathMod script:
{
"Param3D": {
"Description ": ["Twin Klein by Abderrahman Taha 29/04/2017"],
"Name": ["Twin Klein"],
"Component": ["TwinKlein"],
"Const": ["cu=0.001",
"cv=0.001",
"N=5",
"M=3",
"A=3.5",
"B=2",
"C=3",
"D=3",
"MaxU=2*pi",
"MinU=0",
"MaxV=10*pi",
"MinV=0"],
"Funct": ["th=if(M=1, 0.3*((abs(sin(11*u) * cos(11*v)))^19+0.1*((sin(2*N*u)))),if(M=2, 0.9*sin((N*v)% pi/3), if(M=3, (0.4*abs(cos(7*(u))^2 - sin(9*(v))^5 ))^3,if(M=4, 0.4*sin(N*v-u)^100,if(M=5, 0.4*sin(N*v),if(M=6, 0.4*sin(2*N*v-u),if(M=7, 0.4*sin(N*v)^10,if( M = 8 , - 0.3*cos (( abs(cos(12*v) + cos(6*(v-u )) * sin( 12*u )) /1.8)^5 ) * 2 * sin (( abs ( cos( 7*v ) + cos( 7*(v- u )) * sin(17*u ))/1.9) ^ 5.5 ),if( M=9, (( sin(15*u ) * cos(15*u ))) ^4 + (sin(2*N*v )),if( M=10, (( sin(9*u ) * cos ( 9*v )))^2 +0.5* (sin(2*N*u )), (0.4 * abs(cos(7*(u ))^2 - sin(9*(v))^5 ))^3 ))))))))))",
"Fx=if(v<2*pi, (A-(A-1)*cos(v))*cos(u),if( v<3*pi, - B + ( B + cos( u )) * cos( v ),- B + B * cos( v ) - cos( u )))",
"Fy=if(v<2*pi,(A-(A-1)*cos(v))*sin(u), sin(u))",
"Fz=if(v<pi, -C*sin(v), if(v<2*pi, D*v-D*pi, if(v<3*pi,((D-1)+cos(u))*sin(v)+D*pi,-D*v+D*4*pi)))",
"Fx=if(v<6*pi, Fx(u,v,t), -Fx(u,(v-6*pi)%(4*pi),t))",
"Fy=if(v<6*pi,Fy(u,v,t), Fy(u,(v-6*pi)%(4*pi),t))",
"Fz=if(v<6*pi,Fz(u,v,t), -Fz(u,(v-6*pi)%(4*pi),t)-19)",
"DFxu=((Fx(u,v,t)-Fx(u+cu,v,t))/cu)",
"DFxv=((Fx(u,v,t)-Fx(u,v+cv,t))/cv)",
"DFyu=((Fy(u,v,t)-Fy(u+cu,v,t))/cu)",
"DFyv=((Fy(u,v,t)-Fy(u,v+cv,t))/cv)",
"DFzu=((Fz(u,v,t)-Fz(u+cu,v,t))/cu)",
"DFzv=((Fz(u,v,t)-Fz(u,v+cv,t))/cv)",
"n1=(DFyu(u,v,t)*DFzv(u,v,t)-DFzu(u,v,t)*DFyv(u,v,t))",
"n2=(DFzu(u,v,t)*DFxv(u,v,t)-DFxu(u,v,t)*DFzv(u,v,t))",
"n3=(DFxu(u,v,t)*DFyv(u,v,t)-DFyu(u,v,t)*DFxv(u,v,t))",
"Rapp=u/sqrt(u*u+v*v+t*t)",
"Fx=Fx(u,v,t)+if(v<6*pi,th(u,v-3*t,t),th(u,v+3*t,t))*Rapp(n1(u,v,t),n2(u,v,t),n3(u,v,t))",
"Fy=Fy(u,v,t)+if(v<6*pi,th(u,v-3*t,t),th(u,v+3*t,t))*Rapp(n2(u,v,t),n1(u,v,t),n3(u,v,t))",
"Fz=Fz(u,v,t)+if(v<6*pi,th(u,v-3*t,t),th(u,v+3*t,t))*Rapp(n3(u,v,t),n1(u,v,t),n2(u,v,t))"],
"Fx": ["Fx(u,v,t)"],
"Fy": ["Fy(u,v,t)"],
"Fz": ["Fz(u,v,t)"],
"Umax": ["MaxU"],
"Umin": ["MinU"],
"Vmax": ["MaxV"],
"Vmin": ["MinV"]
}
}
Animated Photo
Photo
29/04/2017
2 Photos - View album
Wait while more posts are being loaded