How do I plot a 3D curly brace that is scalable, but the curly parts remain intact, and can be altered where the labeling tip points to?


I have tried insetting the string { into my graphics, and it looks more professional than the BSplineCurve I previously used, but still lacks adjustability.

    Style["{", RGBColor[0.25, 0.25, 0.25], FontSize -> 12, 
     FontFamily -> "Cambria Math"], "PDF"],
 {0.12, 0, 1/2 + 0.045}, Center, 45]

The result looks something like this:

enter image description here

  • $\begingroup$ It seems like a straightforward but very tedious task. What have you tried? Where did you get stuck? $\endgroup$ – Szabolcs Oct 16 '17 at 10:49
  • $\begingroup$ Look at previous attempts, for example mathematica.stackexchange.com/questions/4374/… $\endgroup$ – user18792 Oct 16 '17 at 12:14
  • $\begingroup$ @Szabolcs, I've been using BSplineCurve to make the braces and adjust it by GeometricTransformation. It looks somewhat unprofessional though. $\endgroup$ – 2ub Oct 16 '17 at 12:21
  • $\begingroup$ @user18792, OK I'll take a look. $\endgroup$ – 2ub Oct 16 '17 at 12:23
  • $\begingroup$ What do you mean by 3D? Something like in this question? mathematica.stackexchange.com/questions/128412/… $\endgroup$ – Chip Hurst Oct 16 '17 at 15:54

Here's a way to get most of what you want, stolen from Szabolcs here:

reg = BoundaryDiscretizeGraphics[
   Text[Style["{", FontFamily -> "Cambria"]], _Text];
polyBase = FirstCase[Normal@Show[reg], _Polygon, None, Infinity];
poly = Polygon[
   Prepend[#, ConstantArray[0, Length[#[[1]]]]] &@
     Map[Rescale, Transpose@polyBase[[1]]] // Transpose

That gives you a polygon, which you can just mess with using GeometricTransformation.

Here's the base Polygon:

poly // Graphics3D

base p

Note that you can change it with transformations:

  ScalingTransform[{1, 1, 3}]] // Graphics3D

scaled p

And since it has been Rescale-d that now spans the z range [0, 3]. See also RotationTransform and TranslationTransform.

  • $\begingroup$ pretty much what I want haha. $\endgroup$ – 2ub Oct 17 '17 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.