08.02.2015 Views

Programação Funcional e Concorrente com Scheme

Programação Funcional e Concorrente com Scheme

Programação Funcional e Concorrente com Scheme

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

notas de aula - Jerônimo C. Pellegrini<br />

O procedimento image->xml transforma uma descrição de imagem em S-expressões<br />

em XML e a grava em um arquivo.<br />

( define image- > xml<br />

( lambda ( img file )<br />

( with-output-to-file file<br />

( lambda ()<br />

( display svg-preamble )<br />

( newline )<br />

( xml-write-tag img )))))<br />

(image->xml image "whoo.svg")<br />

O arquivo whoo.svg conterá a seguinte imagem:<br />

2.3.1 Exemplo: triângulo de Sierpinski<br />

O fractal conhecido <strong>com</strong>o triângulo de Sierpinski é um objeto auto-similar, ilustrado na<br />

figura a seguir.<br />

Versão Preliminar<br />

76<br />

[ 27 de outubro de 2010 at 15:47 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!