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: "Displaying" the meaning of zero
Replies: 1   Last Post: Apr 4, 2013 10:30 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Roland Franzius

Posts: 423
Registered: 12/7/04
Re: "Displaying" the meaning of zero
Posted: Apr 4, 2013 10:30 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Am 04.04.2013 04:51, schrieb Clif McInnis:
> I would like to have at least one of these codes work so that when n=0 no disks are displayed but the numeral zero is displayed.
>
> Code #1
>
> Manipulate[
> Grid[Partition[
> Join[Graphics[{Darker[Green], Disk[],
> Text[Style[#, Orange, "Label", 24], {0, 0}]}] & /@ Range[n],
> Table["", {9}]], 10], ItemSize -> 3], {{n, 1, "Number\nof Disks"},
> 0, 20, 1, Appearance -> "Labeled"}]
>



Alternate text for n=0 using an If-Statement instead of the simple
/@Range[n] and deliberately fitting the string "No disks" into a circle
using StyleForm and Overscript


Manipulate[
Grid[Partition[
Join[Graphics[{Darker[Green], Disk[],
Text[Style[#, Orange, "Label", 24], {0, 0}]}] & /@
(*new*) If[n > 0, Range[n], {StyleForm[Overscript["Disk", "No"], 9]}],
Table["", {9}]], 10], ItemSize -> 3], {{n, 1, "Number\nof Disks"},
0, 20, 1, Appearance -> "Labeled"}]


--

Roland Franzius







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.