I wrote a function interactiveDesign
that returns different Graphics3D
items in a list. Then I call the function interactiveDesign
, create a textured part (add
), and show everything in one plot.
interactiveDesign[innerColors_,outerColors_,width_,length_,wallsHeight_,middleHeight_,viewPoint_,click_,procedureButton_]:=
(lines={};
For[i=1,i<= Round[((N[length/10])-1)],i++,(lines=Append[lines,Polygon[{{0,((10*i)-0.5),wallsHeight},{(width/2),((10*i)-0.5),middleHeight},{(width/2),(10*i),middleHeight},{0,(10*i),wallsHeight}}]])];
lines1={};
For[i=1,i<= Round[((N[length/10])-1)],i++,(lines1=Append[lines1,Polygon[{{width,((10*i)-0.5),wallsHeight},{(width/2),((10*i)-0.5),middleHeight},{(width/2),(10*i),middleHeight},{width,(10*i),wallsHeight}}]])];
gridLines1=Graphics3D[{LightBlue,lines},RotationAction->"Clip",Lighting->{innerColors},ViewPoint->viewPoint,Boxed-> False];
gridLines2=Graphics3D[{LightBlue,lines1},RotationAction->"Clip",Lighting->{innerColors},ViewPoint->viewPoint,Boxed-> False];
rightWall=Graphics3D[{innerColors,Polygon[{{0,0,0},{0,0,wallsHeight},{0,length,wallsHeight},{0,length,0}}]},Boxed-> False,Lighting->{{"Ambient",innerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
leftWall=Graphics3D[{innerColors,Polygon[{{width,0,0},{width,0,wallsHeight},{width,length,wallsHeight},{width,length,0}}]},Boxed-> False,Lighting->{{"Ambient",innerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
backWall=Graphics3D[{innerColors,Polygon[{{0,length,0},{0,length,wallsHeight},{N[width/2],length,middleHeight},{width,length,wallsHeight},{width,length,0}}]},Boxed-> False,Lighting->{{"Ambient",innerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
shad1=Graphics3D[{outerColors,Polygon[{{0,0,wallsHeight},{N[width/2],0,middleHeight},{N[width/2],length,middleHeight},{0,length,wallsHeight}}]},Boxed-> False ,Lighting->{{"Ambient",outerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
shad2=Graphics3D[{outerColors,Polygon[{{width,0,wallsHeight},{N[width/2],0,middleHeight},{N[width/2],length,middleHeight},{width,length,wallsHeight}}]},Boxed-> False,Lighting->{{"Ambient",outerColors}},RotationAction->"Clip" ,ViewPoint-> viewPoint];
floor=Graphics3D[{LightBlue,Polygon[{{0,0,0},{0,length,0},{width,length,0},{width,0,0}}]},Boxed-> False,Lighting->{{"Ambient",LightBlue}},RotationAction->"Clip",ViewPoint-> viewPoint ];
frontDoom=Graphics3D[{outerColors,Polygon[{{0,0,wallsHeight},{N[width/2],0,middleHeight},{width,0,wallsHeight}}]},Boxed-> False,Lighting->{{"Ambient",outerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
frontEnd1=Graphics3D[{outerColors,Polygon[{{0,0,0},{0,0,wallsHeight},{N[width/4],0,wallsHeight},{N[width/4],0,0}}]},Boxed-> False ,Lighting->{{"Ambient",outerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
frontEnd2=Graphics3D[{outerColors,Polygon[{{N[(width-(width/4))],0,0},{N[(width-(width/4))],0,wallsHeight},{width,0,wallsHeight},{width,0,0}}]},Boxed-> False,Lighting->{{"Ambient",outerColors}},RotationAction->"Clip",ViewPoint-> viewPoint];
{gridLines1,gridLines2,rightWall,leftWall,backWall,shad1,shad2,floor,frontDoom,frontEnd1,frontEnd2});
parts = interactiveDesign[LightGreen, Gray, 500, 300, 300, 400, {2, -2, 0}, 1, ""];
add = {Graphics3D[{EdgeForm[Gray], Gray,Texture[Style["Subbu", Bold, 25]], Opacity[1],
Polygon[
Inner[Plus, {{30, 0, 10}, {100, 0, 10}, {100, 0, 70}, {30, 0, 70}}, {-5, -5, 0},List],
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}
]},
Boxed -> False, Lighting -> {Gray}, RotationAction -> "Clip"
]};
Show[parts, add]
Everything is fine but the item with Texture
(add
) is blinking whenever the Graphics3D
is rotated. How can I prevent this blinking during rotation?