There are some movie company title logos that have this three-dimensional character effect, which attracted my interest. I used Mathematica to practice one. I wish everyone a happy new year.
In[]:=
ClearAll["'*"]imageDataX=Graphics[Text@Style["2023",Italic,20]]//ImageData;imageProcessX0=MapIndexed[If[Total[#1]===3.,Nothing,{#1,#2}]&,imageDataX,{2}]//Flatten[#,1]&;imageDataY=Graphics[Text@Style["2024",Italic,20]]//ImageData;imageProcessY0=MapIndexed[If[Total[#1]===3.,Nothing,{#1,#2}]&,imageDataY,{2}]//Flatten[#,1]&;
In[]:=
x=imageProcessX0/.{a_List,b_List}->b;marginX=Min/@(x);x0=x-Threaded@marginX;y=imageProcessY0/.{a_List,b_List}->b;marginY=Min/@(y);y0=y-Threaded@marginY;
In[]:=
If(diff=(x0[[All,2]]//Max)-(y0[[All,2]]//Max))>=0,xd=x0;yd=y0-Threaded@,0,xd=x0-Threaded@,0;yd=y0;
diff
2
diff
2
(*{x0[[All,2]]//Max,xd//ListPlot,y0[[All,2]]//Max,yd//ListPlot}*)
In[]:=
deep=Max@{xd[[All,2]],yd[[All,2]]};rotationPoint=;(*{x0[[All,2]]//Max,xd//ListPlot,y0[[All,2]]//Max,{xd,yd,rotationPoint}//ListPlot}*)
{deep,deep,deep}
2
In[]:=
(*ListPlot[{xd,yd,rotationPoint},PlotStyle{Thin,Thin,PointSize[Large]}]*)
In[]:=
Options[cuboid]={"Width"1};cuboid[{x_,y_,z_},OptionsPattern[]]:=Cuboid{x,y,z}-,{x,y,z}+
OptionValue["Width"]
2
OptionValue["Width"]
2
In[]:=
x03D=Table[i~Join~{j},{i,xd},{j,0,deep}]//Flatten[#,1]&;y03D=Table[i~Join~{j},{i,yd},{j,0,deep}]//Flatten[#,1]&;
In[]:=
rotateCenter=RotationTransform[90*Degree,{1,0,0},rotationPoint];
In[]:=
y03DRotation=rotateCenter@y03D//N//Round;u=RotationTransform[90*Degree,{0,1,0}]@Intersection[x03D,y03DRotation];
obj=Graphics3D[{Green,EdgeForm[None],cuboid/@u},BoxedFalse];ParallelTable[Show[obj,ViewPoint5{Cos[-θDegree],Sin[-θDegree],0}],{θ,{0,45,90}}]
Out[]=
,
,
In[]:=
obj=Graphics3D[{Green,EdgeForm[None],cuboid/@u},BoxedFalse];objs=ParallelTable[Show[obj,ViewPoint5{Cos[-θDegree],Sin[-θDegree],0}]//Rasterize,{θ,Subdivide[360,31]}];ListAnimate[objs]
Out[]=
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Happy New Year 2023 -> 2024
by Pred Liu
Wolfram Community, STAFF PICKS, December 31, 2023
https://community.wolfram.com/groups/-/m/t/3093552
by Pred Liu
Wolfram Community, STAFF PICKS, December 31, 2023
https://community.wolfram.com/groups/-/m/t/3093552