<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: ray-tracing</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/ray-tracing.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2025-11-09T16:51:42+00:00</updated><author><name>Simon Willison</name></author><entry><title>Pelican on a Bike - Raytracer Edition</title><link href="https://simonwillison.net/2025/Nov/9/pelican-on-a-bike-raytracer-edition/#atom-tag" rel="alternate"/><published>2025-11-09T16:51:42+00:00</published><updated>2025-11-09T16:51:42+00:00</updated><id>https://simonwillison.net/2025/Nov/9/pelican-on-a-bike-raytracer-edition/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://blog.nawaz.org/posts/2025/Oct/pelican-on-a-bike-raytracer-edition/"&gt;Pelican on a Bike - Raytracer Edition&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
beetle_b ran this prompt against a bunch of recent LLMs:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Write a POV-Ray file that shows a pelican riding on a bicycle.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This turns out to be a harder challenge than SVG, presumably because there are less examples of POV-Ray in the training data:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Most produced a script that failed to parse. I would paste the error back into the chat and let it attempt a fix.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The results are really fun though! A lot of them end up accompanied by a weird floating egg for some reason - &lt;a href="https://blog.nawaz.org/posts/2025/Oct/pelican-on-a-bike-raytracer-edition/#claude-opus-4"&gt;here's Claude Opus 4&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="3D scene. The bicycle has a sort of square frame in the wrong place, but good wheels. The pelican is stood on top - a large white blob, a smaller white blob head, a cylinder neck and a conical beak in the right place, plus legs that reach out-of-place pedals. A egg floats mysteriously in front of the bird." src="https://static.simonwillison.net/static/2025/pov-pelican-opus.png" /&gt;&lt;/p&gt;
&lt;p&gt;I think the best result came &lt;a href="https://blog.nawaz.org/posts/2025/Oct/pelican-on-a-bike-raytracer-edition/#gpt-5"&gt;from GPT-5&lt;/a&gt; - again with the floating egg though!&lt;/p&gt;
&lt;p&gt;&lt;img alt="The bike is a bit mis-shapen but has most of the right pieces. The pelican has legs that reach the pedals and is bending forward with a two-segmented neck and a good beak. A weird egg floats in the front wheel." src="https://static.simonwillison.net/static/2025/pov-pelican-gpt-5.png" /&gt;&lt;/p&gt;
&lt;p&gt;I decided to try this on the new &lt;code&gt;gpt-5-codex-mini&lt;/code&gt;, using the &lt;a href="https://simonwillison.net/2025/Nov/9/gpt-5-codex-mini/"&gt;trick I described yesterday&lt;/a&gt;. Here's &lt;a href="https://gist.github.com/simonw/059e0c5aee54258cdc62ed511ae26b4b"&gt;the code it wrote&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./target/debug/codex prompt -m gpt-5-codex-mini \
  "Write a POV-Ray file that shows a pelican riding on a bicycle."
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It turns out you can render POV files on macOS like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;brew install povray
povray demo.pov # produces demo.png
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The code GPT-5 Codex Mini created didn't quite work, so I round-tripped it through Sonnet 4.5 via Claude Code a couple of times - &lt;a href="http://gistpreview.github.io/?71c4f0966d5d99003ace12197b9d07fe"&gt;transcript here&lt;/a&gt;. Once it had fixed the errors I got this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Two wheels (tire only) sit overlapping half embedded in the ground. The frame is a half-buried red triangle and some other lines. There is a white pall with a tiny yellow beak and two detached cylindrical arms. It's rubbish." src="https://static.simonwillison.net/static/2025/povray-pelican-gpt-5-codex-mini.png" /&gt;&lt;/p&gt;
&lt;p&gt;That's significantly worse than the one beetle_b got &lt;a href="https://blog.nawaz.org/posts/2025/Oct/pelican-on-a-bike-raytracer-edition/#gpt-5-mini"&gt;from GPT-5 Mini&lt;/a&gt;!

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=45862802#45866639"&gt;BeetleB on Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/3d"&gt;3d&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ray-tracing"&gt;ray-tracing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ai"&gt;ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/generative-ai"&gt;generative-ai&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llms"&gt;llms&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/pelican-riding-a-bicycle"&gt;pelican-riding-a-bicycle&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gpt-5"&gt;gpt-5&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/gpt"&gt;gpt&lt;/a&gt;&lt;/p&gt;



</summary><category term="3d"/><category term="ray-tracing"/><category term="ai"/><category term="generative-ai"/><category term="llms"/><category term="pelican-riding-a-bicycle"/><category term="gpt-5"/><category term="gpt"/></entry><entry><title>City In A Bottle – A 256 Byte Raycasting System</title><link href="https://simonwillison.net/2024/May/26/city-in-a-bottle/#atom-tag" rel="alternate"/><published>2024-05-26T18:25:18+00:00</published><updated>2024-05-26T18:25:18+00:00</updated><id>https://simonwillison.net/2024/May/26/city-in-a-bottle/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://frankforce.com/city-in-a-bottle-a-256-byte-raycasting-system/"&gt;City In A Bottle – A 256 Byte Raycasting System&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Frank Force explains his brilliant 256 byte canvas ray tracing animated cityscape demo in detail.

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://twitter.com/hardmaru/status/1794593416598491427"&gt;@hardmaru&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/demoscene"&gt;demoscene&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ray-tracing"&gt;ray-tracing&lt;/a&gt;&lt;/p&gt;



</summary><category term="demoscene"/><category term="javascript"/><category term="ray-tracing"/></entry><entry><title>WolfenFlickr 3D - An unlikely mashup</title><link href="https://simonwillison.net/2008/Aug/29/nihilogic/#atom-tag" rel="alternate"/><published>2008-08-29T10:24:53+00:00</published><updated>2008-08-29T10:24:53+00:00</updated><id>https://simonwillison.net/2008/Aug/29/nihilogic/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.nihilogic.dk/2008/07/wolfenflickr-3d-unlikely-mashup.html"&gt;WolfenFlickr 3D - An unlikely mashup&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Brilliant: Wolfenstein 3D style raycasting in JavaScript with images on the walls that have been pulled in using Flickr’s JSONP API.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/flickr"&gt;flickr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/javascript"&gt;javascript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/jsonp"&gt;jsonp&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ray-tracing"&gt;ray-tracing&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wolfenflickr"&gt;wolfenflickr&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wolfenstein3d"&gt;wolfenstein3d&lt;/a&gt;&lt;/p&gt;



</summary><category term="flickr"/><category term="javascript"/><category term="jsonp"/><category term="ray-tracing"/><category term="wolfenflickr"/><category term="wolfenstein3d"/></entry></feed>