Properties
Similar Topics
Statistics
Comments
12
Participants
3
Subscribers
3
Votes
1
Views
1047
Share
Answered
Sequence(Segment((i, 0), (i, 1)), i, 1, 5)
outputs
S_1=Segment((1, 0), (1, 1))
S_2=Segment((2, 0), (2, 1))
S_3=Segment((3, 0), (3, 1))
S_4=Segment((4, 0), (4, 1))
S_5=Segment((5, 0), (5, 1))
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Execute[Sequence["S_{"+(i)+"}=Segment(("+i+", 0), ("+i +", 1) )",i, 1, Length(Lcolor)]]
Execute(Sequence("ShowLabel( S_{"+i+"}, false )", i, 1, Length(Lcolor)))
Execute(Sequence("SetLineThickness(S_{"+k+"}, 5)", k, 1, Length(Lcolor)))
Execute(Sequence("SetLineStyle(S_{"+k+"}, 4)", k, 1, Length(Lcolor)))
Execute(Sequence("SetColor(S_{"+k+"}, Element(Lcolor,"+k+",1)/255, Element(Lcolor,"+ k+",2)/255, Element(Lcolor,"+ k+",3)/255)", k, 1, Length(Lcolor)))
How are you using them? Maybe the spreadsheet is the best way but it's hard to know without the context
Do you want a free list of segments (i.e., if you drag one segment around the others in the list also move), or do you want each segment to be a separate free object?
Generally you can that via Execute:
And of course you can modify the string generation to generate particular object names for the second version.
For the first option I had thought that
would work, but it surprisigly doesn't. Instead of a list of segments you get a list of lines. Seems like a bug to me, but might just be expected behaviour for some reason.
Comments have been locked on this page!