Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Inset BezierCurve
Replies: 1   Last Post: Sep 21, 2012 4:20 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexander Elkins

Posts: 32
Registered: 4/13/09
Re: Inset BezierCurve
Posted: Sep 21, 2012 4:20 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The problem appears to be that if the VertexColors option is used anywhere
in the graphics, as both ContourPlot and DensityPlot do, then bezier curves
are not drawn. For a simple example, without any VertexColors both the Line
and the BezierCurve is drawn:
Graphics[{Thick, BezierCurve[{{-.3, -1}, {.2, -.5}, {-.8, .5}, {-.3, 1}}],
Line[{{0, -1}, {0, 1}}],
Polygon[{{2, -2}, {6, -2}, {4, Sqrt[3]}}/4, VertexColors -> {}]}]

With some VertexColors only the Line drawn:

Graphics[{Thick, BezierCurve[{{-.3, -1}, {.2, -.5}, {-.8, .5}, {-.3, 1}}],
Line[{{0, -1}, {0, 1}}],
Polygon[{{2, -2}, {6, -2}, {4, Sqrt[3]}}/4,
VertexColors -> {Red, Green, Blue}]}]

Hope this helps...

"Dan O'Brien" <danobrie@gmail.com> wrote in message
news:k3c1ag$etp$1@smc.vnet.net...
> Can others verify that the second plot below produces *straight lines
> *instead of BezierCurves in the the Epilog? Bug?
>
> In[326]:= $Version
>
> Out[326]= "8.0 for Microsoft Windows (64-bit) (October 7, 2011)"
>
> bezcurves =
> Graphics[{{White, Rectangle[{-.4, -.3}, {.4, .3}]}, {Black,
> AbsoluteThickness[1.5],
> BezierCurve[{{-.3, -1}, {.2, -.5}, {-.8, .5}, {-.3, 1}}],
> BezierCurve[{{.3, -1}, {.8, -.5}, {-.2, .5}, {0.3, 1}}]}}];
> contplot = ContourPlot[y, {x, 0, 1}, {y, 0, 1}];
> densplot = DensityPlot[y, {x, 0, 1}, {y, 0, 1}];
>
> Plot[Sin[x], {x, 0, 30},
> Epilog -> {Inset[contplot, Scaled[{.94, .60}], Automatic,
> Scaled[.2]],
> Inset[bezcurves, Scaled@{.2, 0}, Automatic, Scaled@0.1]},
> Frame -> True, PlotRangeClipping -> False]
>
> Plot[Sin[x], {x, 0, 30},
> Epilog -> {Inset[densplot, Scaled[{.94, .60}], Automatic,
> Scaled[.2]],
> Inset[bezcurves, Scaled@{.2, 0}, Automatic, Scaled@0.1]},
> Frame -> True, PlotRangeClipping -> False]
>
>
>
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.