Message Boards Message Boards

GROUPS:

Varying opacity of a thick spline orthogonally to the spline direction

Posted 9 years ago
1901 Views
|
1 Reply
|
2 Total Likes
|
I need opacity diminishing from the center of a thick spline orthogonally to the spline direction (tangent). I could come up only with piling up a few semi-opaque splines with decreasing width on the top of each other. Is there a simpler solution or just better alternative solution with a nice visual? Here is my code
 Manipulate[
  Graphics[{White, Opacity[g], CapForm["Round"], AbsoluteThickness[#],
      BSplineCurve[pts]} & /@ Table[i^s, {i, 1, 10 s^2}],
   PlotRange -> 1.3, Background -> Black]
  , {{s, 1.3, "width"}, .5, 1.7}
  , {{g, .15, "glow"}, .01, .5}
  , {{pts, {{0.8, 0.8}, {-1, 0}, {0, -1}, {1, 0}, {-0.5, 0.5}}},
   Locator, LocatorAutoCreate -> True,
   Appearance -> Style["o", 40, Red]},
FrameMargins -> 0]
I don't have a better solution, but that's a cool effect.

Chris
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract