Answers:
x=Pi/33;Graphics@Map[StringSplit["CATION MEANS FASTER CODING MEANS FEWER CODERS MEANS EASIER COMMUNI",""][[#/x]]~Text~{Sin@#,Cos@#}~Rotate~-#&,Range@66x]
将其增加到178个字节可使其旋转:
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}
@Shaggy节省了41个字节
(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>
设置为250以允许更好的可见性的宽度和高度未包括在字节数中。
(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)}
。
(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)}
Math.PI
为22/7
以节省另外6个字节。
Math.PI/33
≈ 2/21
,但是认为可以吗?
for...of
:for(c of"CATION...
和x.fillText(c,
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
axis([-2,2,-2,2]);
不需要。但您可能想axis equal
在末尾添加一个真实的圆圈
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
输出示例:
在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.
不打高尔夫球
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
使用一种不支持旋转文本的语言进行操作-很有趣。每个字符是一个3x3点阵数组。总共有66个字符,但是有2个在直径上相对的空格我们不打印(在CODERS之后和FASTER之前)。魔术字符串的每个字节编码一个字母的单个垂直行,而相反的单个垂直行编码信。这样,我们只需要扫过180度即可。
MEANS
已经在底部了,我以错误的方式旋转了它)+.2
需要更改为“ -.3
编辑”。
<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
我对“ 更轻松的沟通”的回答的静态版本意味着更快的编码意味着更少的编码器意味着……经过了调整,因此FEWER
位于底部。如果您的字体与我的字体不匹配,则为可调版本:
<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
十六进制转储:
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..
非高尔夫版本(文本):
/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
样本输出:
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);}}
\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}
输出示例