File:Quadre2.png

From TORI
Revision as of 09:56, 19 September 2021 by T (talk | contribs) (Illustration of quadrer by Eratosthenes, simplified version of the "cuber", id est, .. ==ado.t== Routine in PHP <pre> <?php function ado($o,$X,$Y){ fprintf($o,"%s!PS-Adobe-2.0 EPSF-2.0\n","%"); fprintf($o,"%sBoundingBox: 0 0 %d %d\n",...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Original file(940 × 359 pixels, file size: 40 KB, MIME type: image/png)

Summary

Illustration of quadrer by Eratosthenes, simplified version of the "cuber", id est, ..

ado.t

Routine in PHP

<?php
function ado($o,$X,$Y){
fprintf($o,"%s!PS-Adobe-2.0 EPSF-2.0\n","%"); 
fprintf($o,"%sBoundingBox: 0 0 %d %d\n","%%",$X,$Y);
fprintf($o,"/M {moveto} bind def\n");
fprintf($o,"/L {lineto} bind def\n");
fprintf($o,"/S {stroke} bind def\n");
fprintf($o,"/s {show newpath} bind def\n");
fprintf($o,"/C {closepath} bind def\n");
fprintf($o,"/F {fill} bind def\n");
fprintf($o,"/o {.1 0 360 arc C S} bind def\n");
//fprintf($o,"/times-Roman findfont 20 scalefont setfont\n");
fprintf($o,"/W {setlinewidth} bind def\n");
fprintf($o,"/RGB {setrgbcolor} bind def\n");
}
function M($X,$Y){fprintf($GLOBALS["o"],"%6.4f %6.4f M\n",0.+$X,0.+$Y);}
function L($X,$Y){fprintf($GLOBALS["o"],"%6.4f %6.4f L\n",0.+$X,0.+$Y);}
function S(){     fprintf($GLOBALS["o"],"S\n");}
?>

Generator of lines

file ado.t should be loaded to execute the program below.

<?php
include "ado.t";

$x=.7937;
$y=$x*$x;
$z=$y*$x;

printf("%6.4f %6.4f %6.4f\n",$x,$y,$z); 

$o=fopen("quadrer.eps","w"); ado($o,420,120);
fprintf($o,"10 10 translate\n 100 100 scale\n 1 setlinejoin 0.02 W\n");
M(4,0);
L(0,0);
L(0,1);
L(4,1);
fprintf($o,"0.01 W S\n");

M(0,0);
L(1,1);
L(1,0);
fprintf($o,"C 0 0 0 RGB 0.012 W S\n");


M(  $x,0);
L(1+$x,1);
L(1+$x,0);
fprintf($o,"C 1 0 0 RGB 0.02 W S\n");

/*
M(  $x+$y,0);
L(1+$x+$y,1);
L(1+$x+$y,0);
fprintf($o,"C 0 .6 0 RGB 0.012 W S\n");
*/

M(0,0);
L(1./(1.-$x),1.);
fprintf($o,"C 0 0 1 RGB 0.02 W S\n");

fprintf($o,"showpage\n");
fclose($o);
shell_exec("epstopdf quadrer.eps");
shell_exec("open quadrer.pdf");
?>

Generator of labels

\documentclass[12pt,oneside,fleqn,leqno,wrapfigure]{book}       % use "amsart" instead of "article" for 
\usepackage{geometry}                           % See geometry.pdf to learn the layout options. There are lots.
%\geometry{letterpaper}                                  % ... or a4paper or a5paper or ... 
\paperwidth 340pt
\paperheight 130pt
\usepackage[parfill]{parskip}                   % Activate to begin paragraphs with an empty line rather than    
\usepackage{graphicx}                           % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI m
\usepackage{amssymb}
\usepackage{rotating}
%\usepackage{xcolor}
%\definecolor{sky}{RGB}{240,255,255}
%\definecolor{light}{RGB}{240,240,240}
\topmargin -98pt
\oddsidemargin -66pt
\textwidth 590pt
\textheight 730pt
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\usepackage{titlesec} 
\pagestyle{plain}
\begin{document}
\large
\begin{picture}(420,119)
\put(0,0){\includegraphics{quadrer}}
\put(4,113){A}
\put(105,113){B}
\put(187,113){C}
%\put(249,113){D}
\put(290,112){riel}

\put(12,60){1}
\put(112,66){$x$}
\put(192,74){$y$}
%\put(254,80){$z$}

\put(6,40){\rot{90}{rigid} \ero}
\put(45,50){\rot{45}{rigid} \ero}

\put(110,20){E}
\put(192,36){F}
%\put(254,49){G}

\put(280,69){\rot{12}{rotating} \ero}
\put(292,57){\rot{12}{stick} \ero}

\put(1,0){O}
\put(106,-2){P}
\put(186,-1.4){Q}
%\put(249,-2){R}
\put(289,12){riel}

\end{picture}
\end{document}

References

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current09:56, 19 September 2021Thumbnail for version as of 09:56, 19 September 2021940 × 359 (40 KB)T (talk | contribs)Illustration of quadrer by Eratosthenes, simplified version of the "cuber", id est, .. ==ado.t== Routine in PHP <pre> <?php function ado($o,$X,$Y){ fprintf($o,"%s!PS-Adobe-2.0 EPSF-2.0\n","%"); fprintf($o,"%sBoundingBox: 0 0 %d %d\n",...
  • You cannot overwrite this file.

There are no pages that link to this file.

Metadata