15
\$\begingroup\$

Based on this, but I was asked[​1​],[​2​] to do a graphical edition.

EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS…

Task

Generate a circular display of the text EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS . Any uppercase font goes. The letter tops must face out of the circle. Either the space before FEWER must be at the bottom (6 o'clock) or (for brownie points) your text must rotate.

\$\endgroup\$
  • \$\begingroup\$ @Uriel Well, nominally, each letter takes 5.45°, so shall we say 5.4° to 5.5°? \$\endgroup\$ – Adám May 8 '17 at 15:05
  • \$\begingroup\$ I believe that would be a good precision, considering the 2/21 approximation error is small than 0.002. \$\endgroup\$ – Uriel May 8 '17 at 16:11

11 Answers 11

7
\$\begingroup\$

Octave, 168 bytes

for i=1:(n=nnz(s='CATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUNI')),text(sin(i/n*2*pi),cos(i/n*2*pi),s(i),'rotation',-i/n*360);axis([-2,2,-2,2]);end

Try it here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Nice! It seems axis([-2,2,-2,2]); is not needed. But you may want to add axis equal at the end to get a true circle \$\endgroup\$ – Luis Mendo May 8 '17 at 13:25
  • \$\begingroup\$ what do you do with the for loop? Can you add an explanation for an Octave novice like me? \$\endgroup\$ – Michthan May 8 '17 at 13:30
  • \$\begingroup\$ Of course, I'll add an explanation when I have the time. Hopefully later today :-) \$\endgroup\$ – Stewie Griffin May 8 '17 at 15:31
7
\$\begingroup\$

Mathematica, 153 Bytes

x=Pi/33;Graphics@Map[StringSplit["CATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUNI",""][[#/x]]~Text~{Sin@#,Cos@#}~Rotate~-#&,Range@66x]

enter image description here

Increasing it to 178 bytes lets it rotate:

x=Pi/33;Graphics@Map[StringSplit["CATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUNI",""][[#/x-a]]~Text~{Sin@#,Cos@#}~Rotate~-#&,(a+Range@66)x]~Animate~{a,1,66,1}

enter image description here

| improve this answer | |
\$\endgroup\$
7
\$\begingroup\$

HTML and JS, 13 + 170 = 284 227 192 186 183 bytes

41 bytes saved thanks to @Shaggy

(x=c.getContext("2d")).translate(r=c.height/2,r)
for(i in t="CATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUNI"){x.rotate(2/21);x.fillText(t[i],0,-r*.8)}
<canvas id=c height=250 width=250>

The width and height set to 250 to allow better visibility were not included in the bytes count.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Reduce your JS to 223 bytes with (x=c.getContext("2d"))[t="translate"](r=c.height/2,r,i=66);r*=.8;while(i--){x.rotate(a=i*Math.PI/33);x[t](0,-r);x.fillText("EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS "[i],0,0);x[t](0,r);x.rotate(-a)}. \$\endgroup\$ – Shaggy May 8 '17 at 14:03
  • \$\begingroup\$ Or, reduce the latest version of your JS to 179 bytes with (x=c.getContext("2d")).translate(r=c.height/2,r);r*=.8;for(i in t="EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS "){x.rotate(Math.PI/33);x.fillText(t[i],0,-r)} \$\endgroup\$ – Shaggy May 8 '17 at 14:09
  • \$\begingroup\$ If you're happy to sacrifice a little bit of precision, you could replace Math.PI with 22/7 to save another 6 bytes. \$\endgroup\$ – Shaggy May 8 '17 at 14:19
  • \$\begingroup\$ and Math.PI/332/21, but is that considered ok? \$\endgroup\$ – Uriel May 8 '17 at 14:22
  • 1
    \$\begingroup\$ You can save some bytes using es6 for...of: for(c of"CATION... and x.fillText(c, \$\endgroup\$ – Brian McCutchon May 8 '17 at 15:20
5
\$\begingroup\$

Bash + ImageMagick, 168 bytes

convert -font $(convert -list font|grep Font:|head -n1|cut -d" " -f4) label:"FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS " -distort Arc 360 i.png

Example output:

Example output

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ I think you can use a fixed font name to shorten it. \$\endgroup\$ – anna328p May 8 '17 at 0:03
5
\$\begingroup\$

BBC BASIC, 248

Download interpreter at http://www.bbcbasic.co.uk/bbcwin/download.html

F.i=6TO767a=i DIV6*.024-.3r=(80+i MOD6)MOD83*9-369IFASC(M."?[O@Wo}@b}O@O|O@y?l@xHH@GGE@zmo@yo|@}oU@o?m@?L|@phh@GEE@?u?@?{o@Wk?@?I?@g|O@EGE@?]M@z}o@|_|@}?m@?MO@GDG@xhh@?k?@?oU@z}o@?LO@a?L",i DIV6))>>i MOD6A.1CIRCLEFILL500-r*COS(a),500+r*SIN(a),9
N.

Ungolfed

  FORi=6TO767
    a=i DIV 6 * .024 - .3
    r=(80 + i MOD 6) MOD 83 * 9 - 369            :REM iterate through ({80,81,82,0,1,2} - 41 = {39,40,41,-41,-40,-39}) * 9
    IF ASC(MID$("?[O@Wo}@b}O@O|O@y?l@xHH@GGE@zmo@yo|@}oU@o?m@?L|@phh@GEE@?u?@?{o@Wk?@?I?@g|O@EGE@?]M@z}o@|_|@}?m@?MO@GDG@xhh@?k?@?oU@z}o@?LO@a?L",i DIV6))>>i MOD6AND1    THEN
      CIRCLEFILL 500-r*COS(a), 500+r*SIN(a), 9   :REM dots are circle radius 9 according to documentation (but BBC BASIC actually draws them smaller.)
    ENDIF
  NEXT

Doing this in a language that doesn't support rotated text - for fun. Each character is a 3x3 dot matrix array. There are a total of 66 characters but there are 2 diametrically opposite spaces that we do not print (after CODERS and before FASTER.) Each byte of the magic string encodes for a single vertical row of one letter and a single vertical row of the opposite letter. In this way we only have to sweep through 180 degrees.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Clever, but you should be able to do 4 pixels high letters in a byte, no? Also, your text should be rotated 5 characters counter-clockwise. \$\endgroup\$ – Adám May 9 '17 at 4:04
  • \$\begingroup\$ @Adám difficult to do 4 pixels high as code will contain many unprintables. I don't think the interpreter will like it. I misinterpreted/misremembered the spec for rotation. (MEANS was already at the bottom and I rotated it the wrong way) +.2 needs to be changed to -.3 Editing. \$\endgroup\$ – Level River St May 9 '17 at 6:15
  • \$\begingroup\$ Since the OP specifies uppercase, maybe do A as ⠰⠳ and R as ⠸⠫? \$\endgroup\$ – Adám May 9 '17 at 6:20
  • \$\begingroup\$ @Adam that's a lot of extra work now, and I believe it will reduce readability. It's common in arty and calculator fonts for certain uppercase letters to be replaced with equivalents resembling lowercase. I will see how it looks later. \$\endgroup\$ – Level River St May 9 '17 at 6:40
3
\$\begingroup\$

SVG(HTML5), 212 bytes

<svg width=500 height=500><defs><path id=p d=M250,451a201,201,0,0,1,0,-402a201,201,0,0,1,0,402></defs><text font-size="32"><textPath xlink:href=#p>FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS

Static version of my answer to Easier communication means faster coding means fewer coders means … tweaked so that FEWER is at the bottom. Adjustable version in case your font doesn't match mine:

<p><input type=number value=0 min=0 max=9 oninput=p.setAttribute('d','M250,250m0,20_a20_,20_,0,1,1,20_,-20_a20_,20_,0,1,1,-20_,-20_a20_,20_,0,1,1,-20_,20_a20_,20_,0,1,1,20_,20_'.replace(/_/g,this.value))></p>
<svg width=500 height=500><defs><path id=p d=M250,250m0,200a200,200,0,1,1,200,-200a200,200,0,1,1,-200,-200a200,200,0,1,1,-200,200a200,200,0,1,1,200,200></defs><text font-size="32"><textPath xlink:href=#p>FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ How do you adjust the spacing between MEANS and FEWER? In my browser, they read like one word. \$\endgroup\$ – Adám May 10 '17 at 5:42
  • \$\begingroup\$ @Adám I've ported the adjustable version across. \$\endgroup\$ – Neil May 10 '17 at 8:12
  • \$\begingroup\$ Nice. That's going over and beyond. \$\endgroup\$ – Adám May 10 '17 at 8:14
2
\$\begingroup\$

Postscript (127 bytes)

Hex dump:

00000000: 2f53 2031 92a5 9233 2f4d 6f6e 6f20 3992  /S 1...3/Mono 9.
00000010: 8e88 6432 3030 926b 3292 9a28 4943 4154  ..d200.k2..(ICAT
00000020: 494f 4e20 4d45 414e 5320 4641 5354 4552  ION MEANS FASTER
00000030: 2043 4f44 494e 4720 4d45 414e 5320 4645   CODING MEANS FE
00000040: 5745 5220 434f 4445 5253 204d 4541 4e53  WER CODERS MEANS
00000050: 2045 4153 4945 5220 434f 4d4d 554e 297b   EASIER COMMUN){
00000060: 5388 0033 2032 9287 9278 5320 6661 6c73  S..3 2...xS fals
00000070: 6592 112d 352e 3435 9288 7d92 4992 a7    e..-5.45..}.I..

Ungolfed (text) version:

/S 1 string def
/Mono 9 selectfont
100 200 moveto
2 setlinejoin
(ICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUN)
{S 0 3 2 roll put S false charpath -5.45 rotate} forall
stroke

Sample output:

enter image description here

| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

Java 8, 1,087 bytes

import javafx.animation.*;import javafx.application.*;import javafx.scene.*;import javafx.scene.layout.*;import javafx.scene.shape.*;import javafx.scene.text.*;import javafx.stage.*;import javafx.util.*;import java.util.*;import static javafx.animation.PathTransition.*;public class P extends Application{@Override public void start(Stage stage)throws Error{char[] t="EASIER COMMUNICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS".toCharArray();Shape q=new Circle(400,400,120);List<Text>h=new ArrayList<>();List<Transition>z=new ArrayList<>();for(char c:t){Text o=new Text(c+"");h.add(o);z.add(x(q, o));}Pane p=new Pane();p.getChildren().addAll(h);int s=h.size();for(int i=0;i<s;i++){Transition w=z.get(i);w.jumpTo(Duration.seconds(10).multiply((i+.5)*1/s));w.play();}stage.setScene(new Scene(p,800,800));stage.show();}Transition x(Shape e,Text t){PathTransition v=new PathTransition(Duration.seconds(10),e,t);v.setCycleCount(INDEFINITE);v.setOrientation(OrientationType.ORTHOGONAL_TO_TANGENT);v.setInterpolator(Interpolator.LINEAR);return v;}static void main(String[]a){launch(a);}}

Screenshot

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Nice, but you seem to be missing a space between MEANS and EASIER COM. \$\endgroup\$ – Adám Sep 3 '17 at 4:39
  • 1
    \$\begingroup\$ @Adám: It does not conform with the FEWER at 6 o'clock rule! \$\endgroup\$ – sergiol Nov 12 '17 at 16:32
0
\$\begingroup\$

LaTeX + TikZ, 380 bytes

\documentclass[tikz,border=20pt]{standalone}\usetikzlibrary{decorations,decorations.text,}\begin{document}\begin{tikzpicture}\draw[color=white,rotate=-90,postaction={decorate,decoration={text along path,raise=4pt,text align={align=center},text={FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS },reverse path}}](0,0)circle(2.425cm);\end{tikzpicture}\end{document}

Example output

enter image description here

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Tcl/Tk, 222

grid [canvas .c]
set i 90;lmap c [split "FEWER CODERS MEANS EASIER COMMUNICATION MEANS FASTER CODING MEANS" ""] {.c cr t [expr {93*cos([set i [expr $i+5.5]]/57.3)+99}] [expr {93*sin($i/57.3)+99}] -te $c -ang [expr -$i-90]}

enter image description here

Will golf it more later!

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Java 10, 690 bytes

import java.awt.*;v->new Frame(){{add(new Panel(){RenderingHints R;Math M;public void paint(Graphics g){Graphics2D G=(Graphics2D)g;G.setRenderingHint(R.KEY_ANTIALIASING,R.VALUE_ANTIALIAS_ON);var v=new Font("Hei",0,8).createGlyphVector(G.getFontRenderContext(),"ICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUN");int n=99,i=0;for(G.translate(n,0);i<66;){double p=M.PI/2,t=-6/1.1*i*p/90+p;v.setGlyphPosition(i,new Point(0,0));var a=java.awt.geom.AffineTransform.getTranslateInstance((int)(n*M.cos(t)+n),(int)(-n*M.sin(t)+n));a.rotate(t=4*p*i/66);a.translate(n*M.cos(p-t),n*M.sin(p-t));a.translate(-4,0);G.fill(a.createTransformedShape(v.getGlyphOutline(i++)));}}});show();}}

Result:

enter image description here

Explanation:

import java.awt.*;              // Required import for almost everything
v->                             // Method with empty unused parameter and Frame return-type
  new Frame(){                  //  Create the Frame
   {                            //   In an inner code-block:
     add(new Panel(){           //    Add a Panel we can draw on:
       RenderingHints R;        //    RenderingHints null-instance on class-level, for static calls
       Math M;                  //    Math null-instance on class-level, for static calls
       public void paint(Graphics g){
                                //     Overwrite its paint method:
         Graphics2D G=(Graphics2D)g;
                                //      Cast Graphics to Graphics2D, to open up more methods
         G.setRenderingHint(R.KEY_ANTIALIASING,R.VALUE_ANTIALIAS_ON);
                                //      Apply a focus rendering, otherwise the text would be too vague
         var v=new Font("Hei",0,//      Create a "Hei"-Font (could alternatively be Kai)
                                //      (note that a centered monospace font would look a lot better
                                //       for letters like the 'I's)
               8)               //      of font-size 8
               .createGlyphVector(G.getFontRenderContext(),
                                //      Create a GlyphVector using that Font
           "ICATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUN");
                                //      With this String as text (first character will be at the top)
         int n=99,              //      Integer we'll use a bunch of times, radius of the circle 99
             i=0;               //      Index integer, starting at 0
         for(G.translate(n,0);  //      Set the starting coordinate at 99,0, otherwise the circle
                                //      would be partially outside of the Frame boundaries
             i<66;){            //      Loop `i` in the range [0, 66):
                                //      (66 is the amount of characters of the text)
           double p=M.PI/2,     //       Temp-double `p`, set to PI/2
                  t=            //       Temp-double, which will start at:
                    -6/1.1      //        -360 / 66
                    *i          //        multiplied by the current `i`
                    *p/90       //        multiplied by PI/180
                    +p;         //        And add PI/2 to that
           v.setGlyphPosition(i,new Point(0,0));
                                //        Start the `i`'th Glyph position at 0,0
           var a=java.awt.geom.AffineTransform.getTranslateInstance(
                                //        Create an AffineTransform Translation instance, starting at:
                  (int)(        //         x-coordinate as casted integer:
                   n            //          99
                   *M.cos(t)    //          multiplied by the cosine of `t`
                   +n),         //          Add 99 to that
                  (int)(        //         y-coordinate as casted integer:
                   -n           //          -99
                   *M.sin(t)    //          multiplied by the sinus of `t`
                   +n));        //          Add 99 to that
           a.rotate(            //         Then rotate the current letter by,
                    t=          //         and set `t` to it at the same time:
                      4*p       //          2*PI
                      *i        //          multiplied by the current `i`
                      /66);     //          divided by the length 66
           a.translate(         //         Then move the letter to the correct position:
                                //          x-coordinate:
              n                 //           99
              *M.cos(p-t),      //           multiplied by the cosine of PI/2 - the new `t`
                                //          y-coordinate:
              n                 //           99
              *M.sin(p-t));     //           multiplied by the sinus of PI/2 - the new `t`
           a.translate(-4,0);   //          Slightly adjust based on the font-size
           G.fill(              //          Then add to the Panel through the Graphics2D:
             a.createTransformedShape(
                                //           The shape of:
               v.getGlyphOutline(i++)));}}});
                                //            The current `i`'th Glyph we just created
     show();}}                  //    And afterwards show the Frame
| improve this answer | |
\$\endgroup\$

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.