Group Abstract Group Abstract

Message Boards Message Boards

[GIF] Master Control Program (Minimal 7_4 knot on the simple cubic lattice)

2 Replies
Posted 6 years ago

Since the background is a fixed thing and not being actively updated, you can put the initialization in DynamicModule[]; thus, you can do something like

DynamicModule[{p, q, b, n, θ, pl, col = RGBColor["#cdffeb"], 
               bg = RadialGradientImage[RGBColor /@ {"#009f9d", "#07456f", "#0f0a3c"},
                                        {540, 540}]},
Manipulate[(* stuff *)
           Overlay[{bg, Graphics[{EdgeForm[Directive[Thickness[.025],
                                                     JoinForm["Round"], col]],
                                  FaceForm[], Polygon[pl]},
                   ImageSize -> 540, PlotRange -> 4]}], {t, 0, 4}]]

Yet another alternative that avoids Overlay[] would be to use a textured polygon as background. To do that, you can replace the last line inside the Manipulate[] with

Graphics[(* stuff *), ImageSize -> 540, PlotRange -> 4, 
         Prolog -> {Texture[bg], 
                    Polygon[{Scaled[{0, 0}], Scaled[{1, 0}],
                             Scaled[{1, 1}], Scaled[{0, 1}]}, 
                            VertexTextureCoordinates ->
                            {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}]
POSTED BY: J. M.

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming, and consider contributing your work to the The Notebook Archive!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard