On 11/25/2015 12:32 PM, Angel Herráez wrote:
> Hi Jmolers
>
> I'd like to use a loop to define a series of points (using atom expressions)
> and then use that series to draw a polyline.
>
> No problem in defining the series of points.
> But then I need to pass them to either
>   DRAW myline diameter 0.3 curve <series of points>
> or to the VERTEX components of the  CGO  command
>
> I don't seem to figure out how the points (stored in Jmol variables) may be
> passed to the command
>
> Example:
> tt = "draw eje diameter 0.3 curve"
> for (i=2;i<=18;i++) { tt += "{(" + i + "," + (120-i) + ") & *.C1'}" }
> show @tt
>
> produces what I need, but that "tt" is a text string, not a command
>
> Example:
> p = array()
> for (i=2;i<=18;i++) { p[i] = "{(" + i + "," + (120-i) + ") & *.C1'}" }
> show @p
>
> Again, how to pass that to the cgo command?
>
If you have already the command string you could just run it with the 
'script' command (not tested):

x = script(tt);
y = script(p);

The assignement to a variable is essential, even for script commands 
that produce graphical output.

Regards,
Rolf

-- 

Rolf Huehne
Postdoc

Leibniz Institute on Aging - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax:     +49 3641 65 6210
E-Mail:  rhue...@leibniz-fli.de
Website: http://www.leibniz-fli.de

           Scientific Director: Prof. Dr. K. Lenhard Rudolph
        Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Burkhard Zinner

VAT No: DE 153 925 464
Register of Associations: No. 230296, Amtsgericht Jena
Tax Number: 162/141/08228


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to