3
$\begingroup$

I wonder how to plot a diagram like thisenter image description here

I don't mean to duplicate this diagram, but can we possibly come up with a way to plot the polymer chain with as many monomers as we want, also, can we specify the each angle meanwhile?

Appreciate any help!

$\endgroup$
6
  • 1
    $\begingroup$ Have you given it a try perhaps? $\endgroup$
    – Johu
    Commented Jan 29, 2017 at 13:18
  • 1
    $\begingroup$ Have you seen AnglePath[]? $\endgroup$ Commented Jan 29, 2017 at 13:20
  • 1
    $\begingroup$ It needs to be built from graphics primitives as described here and in related tutorials linked at the end of that page. Skim through those pages, give it a try, and let us know where you got stuck. $\endgroup$
    – Szabolcs
    Commented Jan 29, 2017 at 13:27
  • $\begingroup$ @Johu, I'm not asking someone to plot this for me, I'm trying to get some clue where to start from. And thanks, AnglePath[ ] looks useful. $\endgroup$
    – Gvxfjørt
    Commented Jan 29, 2017 at 13:27
  • 1
    $\begingroup$ You might be interested in this or this. $\endgroup$ Commented Jan 29, 2017 at 13:42

1 Answer 1

3
$\begingroup$

The basic steps will be:

  • Construct the list of coordinates for where the "balls" will be. As J.M. said, AnglePath will be useful
  • Write a function ball for drawing a ball at given coordinates
  • Write a function link for drawing a link between two coordinates
  • Map the ball function over list
  • Apply the link function at level 1 to Partition[list, 2, 1].

References:

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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