{"id":11513965,"url":"https://github.com/susam/pov25","last_synced_at":"2026-02-15T01:02:04.530Z","repository":{"id":149494550,"uuid":"131829016","full_name":"susam/pov25","owner":"susam","description":"Ray tracing 25 scenes in 25 days with POV-Ray","archived":false,"fork":false,"pushed_at":"2018-06-11T04:10:49.000Z","size":21296,"stargazers_count":165,"open_issues_count":0,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-18T04:25:44.169Z","etag":null,"topics":["graphics","povray","raytracing"],"latest_commit_sha":null,"homepage":"","language":"POV-Ray SDL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/susam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T09:31:51.000Z","updated_at":"2025-07-12T11:22:28.000Z","dependencies_parsed_at":"2024-06-22T11:12:56.483Z","dependency_job_id":"a170d760-1c04-4dd0-9d2b-75818766517a","html_url":"https://github.com/susam/pov25","commit_stats":null,"previous_names":["susam/pov25","spcask/pov-ray-tracing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/susam/pov25","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susam%2Fpov25","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susam%2Fpov25/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susam%2Fpov25/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susam%2Fpov25/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/susam","download_url":"https://codeload.github.com/susam/pov25/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/susam%2Fpov25/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274152220,"owners_count":25231288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphics","povray","raytracing"],"created_at":"2024-06-22T11:03:27.596Z","updated_at":"2026-02-15T01:01:59.506Z","avatar_url":"https://github.com/susam.png","language":"POV-Ray SDL","funding_links":[],"categories":["POV-Ray SDL"],"sub_categories":[],"readme":"Ray Tracing with POV-Ray\n========================\nFour years ago, I wrote [a simple ray tracer][JRT] in Java to render a\nscene hard-coded in the source code. After writing this ray tracer, I\ncame to know about sophisticated ray tracing engines available for free\non the internet. POV-Ray seemed to be one of the most popular engines\nand I decided to learn to use it. However, I never managed to devote\ntime to learning it in the last four years. Finally, in May 2013, I\ndecided to teach myself to do ray tracing with POV-Ray. This activity\nconsisted of learning the concepts required to write scene descriptions\nfor POV-Ray, and writing a new scene each day for 25 days in the month\nof May 2013.\n\n[JRT]: https://github.com/mycask/java-ray-tracing\n\n\nContents\n--------\n* [Introduction](#readme)\n* [A scene a day](#a-scene-a-day)\n  * [Balls and boxes](#balls-and-boxes)\n  * [Transformed Boxes](#transformed-boxes)\n  * [Marble Sphere in Rubber Torus](#marble-sphere-in-rubber-torus)\n  * [Crystal Ball](#crystal-ball)\n  * [Prisms](#prisms)\n  * [Ripples](#ripples)\n  * [Textures](#textures)\n  * [Window](#window)\n  * [Sky and Water](#sky-and-water)\n  * [Soft Shadows](#soft-shadows)\n  * [Focal Blur](#focal-blur)\n  * [Pawns](#pawns)\n  * [Glass Pawns](#glass-pawns)\n  * [Globe](#globe)\n  * [Saturn](#saturn)\n  * [Planets](#planets)\n  * [Moon](#moon)\n  * [Canoe](#canoe)\n  * [Eggs](#eggs)\n  * [Glass of Water](#glass-of-water)\n  * [Glass Grid](#glass-grid)\n  * [Earth and Sky](#earth-and-sky)\n  * [Glasses](#glasses)\n  * [Kaleidoscope](#kaleidoscope)\n  * [Dice](#dice)\n* [Installation of POV-Ray](#installation-of-pov-ray)\n* [POV-Ray commands](#pov-ray-commands)\n* [Study URLs](#study-urls)\n* [Conclusion](#conclusion)\n\n\nA scene a day\n-------------\n01. ### Balls and boxes ###\n    ![Balls and boxes][S01]\n\n    This scene consists of three spheres and three boxes. The scene is\n    illuminated by three point light sources.\n\n    One light source is shining from the top right corner of the scene.\n    This light source is behind the camera. This casts the shadow of the\n    green box on the blue ball and that of the blue ball on the yellow\n    one.\n\n    Another one is shining from the left side of the scene. This light\n    source is also behind the camera. This casts the smaller shadow of\n    the red box on the blue ball, that of the green box on the orange\n    ball and that of the blue ball on the pale pink box.\n\n    There is a third light source at the bottom right corner of the\n    scene. This light source is present slightly in front of the camera.\n    This casts the longer shadow of the red box on the blue ball.\n\n02. ### Transformed Boxes ###\n    ![Transformed Boxes][S02]\n\n    The white box is centred at the origin. The camera is placed 10\n    units behind the origin. One light source is placed 10 units behind\n    the origin, i.e. at the same place where the camera is. There is\n    another light source shining from the top left corner of the scene.\n\n    All boxes except the three boxes in the bottom-right quadrant of\n    this image have the same dimensions as that of the white box.\n\n    The red box is translated to \u0026lt;2, 2, 2\u0026gt;, i.e. 2 units left from\n    the origin, 2 units above the origin and 2 units further away from\n    the origin in the direction perpendicular to the image.\n\n    The green box is translated to \u0026lt;5, 5, 2\u0026gt;, i.e. it has been\n    shifted further way towards the top right corner. As a result we can\n    see more of its left and bottom faces.\n\n    The blue box is translated to \u0026lt;5, 5, 5\u0026gt;, i.e. it is placed 3\n    units behind the green box. As a result it appears smaller than the\n    green box.\n\n    The yellow box is first rotated around z axis by 45° and then\n    shifted left by 5 units\n\n    The cyan box is first shifted left by 5 units and then the box is\n    rotated around z axis by 45°. In the rendered image, it can\n    be seen that the whole box as a whole orbits around the z axis due\n    to the rotation and occupies a new place 45° away from the\n    yellow box in this orbit.\n\n    The length of the brown box is first doubled along x axis, then it\n    is rotated 45° around y axis. As a result, the elongated face\n    is rotated towards left. Then it is translated to a new position\n    below the origin, a little further away towards the right.\n\n    The pink box is first rotated 45° around y axis. Then it is\n    scaled by a factor of 2 along x axis. As a result, the diagonal of\n    the box running along x axis seems to be elongated. Finally, this\n    box is translated and placed right below the brown box.\n\n    The maroon box is first rotated along y axis by 45°. Then it\n    is translated to a new position right below the pink box. Finally,\n    it is scaled by a factor of 2 along the x axis. As a result, the box\n    appears to have moved further along the x axis. Also, its diagonal\n    along the x axis appears to be stretched.\n\n03. ### Marble Sphere in Rubber Torus ###\n    ![Marble Sphere in Rubber Torus][S03]\n\n    There are two light sources in this scene: one where the camera is\n    situated, and another on the left side of the scene.\n\n    The sphere and the torus appear to be specular due to Phong\n    highlighting. As a result, two bright shiny spots can be seen on the\n    sphere as well. One spot is closer to the camera while the other one\n    is on the left side of the sphere. These spots are due to the two\n    light sources. Similar but fainter shiny spots can be seen on the\n    torus as well. The specular highlights on the torus appear fainter\n    because a less saturation value was used for the Phong highlighting\n    was used for the torus.\n\n    In addition to making the sphere specular, it has also been made\n    slightly reflective. As a result, a faint reflection of the torus\n    can be seen in the bottom hemisphere of the sphere.\n\n04. ### Crystal Ball ###\n    ![Crystal Ball][S04]\n\n    There are two light sources in this scene: one at the centre of the\n    ceiling and another at the top of the wall opposite to the camera.\n    The walls are glossy, and thus reflect the scene slightly.\n\n    There is a mirror on the wall opposite to the camera. The mirror has\n    a wooden frame. The reflection of a door in the wall behind the\n    camera can be seen in the wall opposite to the camera.\n\n    There is a crystal ball placed on a wooden block. There are two\n    other coloured balls lying on the floor.\n\n05. ### Prisms ###\n    ![Prisms][S05]\n\n    The room in this scene is similar to the room in the previous scene.\n    However, in this scene the floor is reflective instead of the walls.\n    The balls are missing from this scene and there are two prisms\n    instead on the wooden block. The reflection of the door behind the\n    camera can be seen in the mirror on the wall opposite to the camera.\n\n06. ### Ripples ###\n    ![Ripples][S06]\n\n    This scene contains a rubber tube floating on water. There are\n    ripples on the surface of water. The ripples have been made slightly\n    turbulent in order to make it look a little natural.\n\n07. ### Textures ###\n    ![Textures][S07]\n\n    This scene contains a wooden block and spheres with various textures\n    placed on the floor of a room. The block is made of pine wood. There\n    is a ruby glass sphere placed on the block. There is a pink granite\n    sphere placed between the mirror and the wooden block. The leftmost\n    sphere is made of white marble. The one to its right is made of\n    brown agate. The next sphere that looks dark is made of blue agate.\n    The reflective sphere on the floor is made of aluminium. The\n    rightmost sphere is made of red marble. The mirror at the back shows\n    a reflection of the scene.\n\n08. ### Window ###\n    ![Window][S08]\n\n    This scene shows light entering a room through a window. Isotropic\n    scattering makes the light beam coming through the window visible.\n\n09. ### Sky and Water ###\n    ![Sky and Water][S09]\n\n    This scene contains water and sky. The sky contains clouds and the\n    water contains irregular ripples. The water reflects the sky.\n\n10. ### Soft Shadows ###\n    ![Soft Shadows][S10]\n\n    This scene contains a few marble balls and metal rods placed on a\n    wooden plank. The scene is illuminated by three area light sources.\n    The area light sources cast soft shadows. The light sources fade\n    away with distance. As a result, the scene at the top left corner of\n    the image appears to be darker than the rest of the scene. The soft\n    shadows and the fading light sources make this image seem quite\n    photorealistic.\n\n11. ### Focal Blur ###\n    ![Focal Blur][S11]\n\n    This scene contains six coloured balls lying on a tiled floor. The\n    camera is focussed on the white ball at the centre. The shallow\n    depth of field causes other balls to blurred.\n\n12. ### Pawns ###\n    ![Pawns][S12]\n\n    This scene contains a white pawn and a black pawn placed on a\n    chessboard. There are two light sources shining on the chessboard:\n    one from the left side and one behind the chessboard.\n\n13. ### Glass Pawns ###\n    ![Glass Pawns][S13]\n\n    This scene contains glass pawns placed on a glass chessboard.\n\n14. ### Globe ###\n    ![Globe][S14]\n\n    This scene contains a globe placed on a glossy surface. The globe\n    was created by wrapping a map of the earth around a sphere. The map\n    used to create this globe can be found in the [maps](maps) directory.\n\n15. ### Saturn ###\n    ![Saturn][S15]\n\n    This scene is an attempt to model Saturn along with its five\n    prominent rings. The planet and the rings are drawn to scale.\n\n    The innermost ring is the D ring. The next ring that appears to be\n    translucent is the C ring. The next opaque ring is called the B\n    ring. Then there is a gap called the Cassini Division. After this\n    division, lies the A ring. The A ring contains a thin gap called the\n    Encke Gap. The outermost thin ring is the F ring. The region between\n    the A ring and the F ring is called the Roche Division.\n\n    The shadow of the gas giant on the rings can be seen in the right\n    side of this image.\n\n16. ### Planets ###\n    ![Planets][S16]\n\n    This scene represents the models of the eight planets of our solar\n    system. The sizes of the planets are to scale in this scene. Names\n    of the planets from left to right: Jupiter, Saturn, Uranus, Neptune,\n    Earth, Venus, Mars and Mercury.\n\n17. ### Moon ###\n    ![Moon][S17]\n\n    This scene contains a waxing half moon. This scene was created by\n    wrapping a map of the moon around a sphere and rotating the sphere\n    in order to show the side of the moon that is visible from the\n    Earth.\n\n18. ### Canoe ###\n    ![Canoe][S18]\n\n    This scene contains a white canoe floating on water. The hull of the\n    canoe has been modelled using ellipsoids. The hollow section of the\n    hull has been modelled by removing smaller ellipsoids from a large\n    ellipsoid that forms the outer surface of the hull of the canoe. The\n    canoe contains three wooden seats. The water is slightly reflective.\n    The water reflects the sky, and thus appears blue in colour. A\n    distorted reflection of the canoe can be seen in the water.\n\n19. ### Eggs ###\n    ![Eggs][S19]\n\n    This scene contains half a dozen eggs lying on a tiled surface. Each\n    egg is modelled by combining halves of a prolate ellipsoid and a\n    sphere. The ellipsoid is cut into two halves at the equator. One\n    half is used to model the little end of each egg. The big end of\n    each egg is formed using a hemisphere cut off from the sphere. The\n    length of the semi-major axis of the prolate ellipsoid is 1.6 times\n    that of its semi-minor axis. The tiled surface on which the eggs are\n    kept are slightly glossy and reflective. Two fading area light\n    sources have been used to illuminate the scene. One light source\n    shines from the left side of the scene. The other light source\n    shines from the camera.\n\n20. ### Glass of Water ###\n    ![Glass of Water][S20]\n\n    This scene contains a glass of water. There is only one point light\n    source in this scene shining from the left side. The water has been\n    modelled as a material with refractive index of 1.33. The reflection\n    of light by the water has been modelled using Fresnel reflection.\n\n21. ### Glass Grid ###\n    ![Glass Grid][S21]\n\n    This scene contains a grid made of glass nodes and edges. Each node\n    in the grid is spherical. Each edge is cylindrical. The edges\n    connect adjacent nodes.\n\n22. ### Earth and Sky ###\n    ![Earth and Sky][S22]\n\n    This scene shows the earth and sky meeting at the horizon. A faint\n    fog can be seen near the horizon. The shadows of the clouds can be\n    seen on the ground. A viewing angle of 90° has been used to model\n    the camera.\n\n23. ### Glasses ###\n    ![Glasses][S23]\n\n    This scene contains two glasses kept in a kitchen corner. The\n    kitchen has tiled walls. A faint reflection of the window in the\n    kitchen can be seen on the wall behind the wine glass. Light\n    entering from this window illuminates the kitchen. There is another\n    yellow light source attached to the top of the wall behind the\n    glasses.\n\n24. ### Kaleidoscope ###\n    ![Kaleidoscope][S24]\n\n    This scene shows the inside view of a kaleidoscope. The kaleidoscope\n    is constructed using three rectangular mirrors placed at 60° angle\n    to one another so that they form an equilateral triangle shaped\n    empty space between them. The triangular empty space between the\n    mirrors can be spotted by looking for the orange disc at the centre\n    of this image. The pink, green and purple discs around this orange\n    disc are placed at three corners of this triangle.\n\n    There are a few more objects, such as coloured grains, little\n    pyramids and pearls placed in this empty space. Multiple reflections\n    of these objects can be seen in the three mirrors surrounding the\n    empty space. The reflection of the empty space can be seen as faint\n    dark triangles throughout this scene.\n\n25. ### Dice ###\n    ![Dice][S25]\n\n    This scene contains three glass dice placed on a wooden surface. The\n    scene is illuminated by three fading area light sources.\n\n[S01]: png/scene01.png\n[S02]: png/scene02.png\n[S03]: png/scene03.png\n[S04]: png/scene04.png\n[S05]: png/scene05.png\n[S06]: png/scene06.png\n[S07]: png/scene07.png\n[S08]: png/scene08.png\n[S09]: png/scene09.png\n[S10]: png/scene10.png\n[S11]: png/scene11.png\n[S12]: png/scene12.png\n[S13]: png/scene13.png\n[S14]: png/scene14.png\n[S15]: png/scene15.png\n[S16]: png/scene16.png\n[S17]: png/scene17.png\n[S18]: png/scene18.png\n[S19]: png/scene19.png\n[S20]: png/scene20.png\n[S21]: png/scene21.png\n[S22]: png/scene22.png\n[S23]: png/scene23.png\n[S24]: png/scene24.png\n[S25]: png/scene25.png\n\n\nInstallation of POV-Ray\n-----------------------\nThe scenes above were rendered using POV-Ray 3.6 on a Debian system. The\nsteps below describe how POV-Ray 3.6 was installed.\n\n1. Download POV-Ray 3.6 for Linux from\n   \u003chttp://www.povray.org/ftp/pub/povray/Official/Linux/povlinux-3.6.tgz\u003e.\n   In case, the above URL becomes unavailable in future, a copy of the\n   tarball can be obtained from [tgz/povlinux-3.6.tgz](tgz/povlinux-3.6.tgz).\n\n2. Enter the following commands to begin installation.\n\n        tar -xvzf povlinux-3.6.tgz\n        cd povray-3.6\n        bash install -no-arch-check\n\n3. Enter `U` to make a user level installation at a custom location.\n\n4. Enter `~/povray` as the custom location to install POV-Ray.\n\n5. Enter the following commands to view the version and help message of\n   povray and its man page.\n\n        ~/povray/bin/povray\n        man -M ~/povray/man/ povray\n\n6. Add the following line to ~/.bashrc.\n\n        export PATH=$PATH:~/povray/bin\n\n   Now povray can be executed and its man page can be seen from any\n   directory simply by entering the following commands.\n\n        povray\n        man povray\n\nThe following errors were faced during installation:\n\n1. On trying to install by executing `./install`, the following\n   error was displayed:\n\n        This machine does not seem to be a Linux PC.\n\n   This error occurred because the script looks for `i?86*` or\n   `athlon*` in the output of `uname -m`, but the output on my system\n   was: `x86_64`.\n\n2. On executing `./install -no-arch-check`, the following error\n   was displayed:\n\n        ./install: 1094: read: Illegal option -n\n\n   This error occurred because the script is executed by /bin/sh\n   by default. This was resolved by executing the script with bash.\n\n\nPOV-Ray commands\n----------------\nThe following is a list of commands that were executed to render various\nscenes.\n\n    povray -W960 -H720 scene01.pov\n    povray -W960 -H720 scene02.pov\n    povray -W960 -H720 scene03.pov\n    povray -W960 -H720 +A0.0 scene04.pov\n    povray -W960 -H720 +Q9 +A0.0 +AM2 +R5 -J scene05.pov\n    povray -W960 -H720 +A0.0 +AM2 scene06.pov\n    povray -W960 -H720 +A0.0 +AM2 scene07.pov\n    povray -W960 -H720 +A0.0 scene08.pov\n    povray -W960 -H720 +A0.0 +AM2 scene09.pov\n    povray -W960 -H720 +A0.0 scene10.pov\n    povray -W960 -H720 scene11.pov\n    povray -W960 -H720 +A0.0 +AM2 scene12.pov\n    povray -W960 -H720 +A0.0 scene13.pov\n    povray -W960 -H720 +A0.0 +AM2 scene14.pov\n    povray -W960 -H720 +A0.0 +AM2 scene15.pov\n    povray -W960 -H720 +A0.0 +AM2 scene16.pov\n    povray -W960 -H720 +A0.0 +AM2 scene17.pov\n    povray -W960 -H720 +A0.0 +AM2 scene18.pov\n    povray -W960 -H720 +A0.0 scene19.pov\n    povray -W960 -H720 +A0.0 +AM2 +R5 -J scene20.pov\n    povray -W960 -H720 +A0.0 +AM2 -J scene21.pov\n    povray -W960 -H720 +A0.0 +AM2 scene22.pov\n    povray -W960 -H720 +A0.0 +AM2 -J scene23.pov\n    povray -W960 -H720 +A0.0 +AM2 scene24.pov\n    povray -W960 -H720 +A0.1 +AM2 scene25.pov\n\n\nStudy URLs\n----------\nThe following is a list of tutorials and articles I studied to teach\nmyself some elementary ray tracing with POV-Ray.\n\n1. [The Online POV-Ray Tutorial: Introduction to POV-Ray and Ray-tracing][T1]\n2. [The Online POV-Ray Tutorial: POV-Ray Basics][T2]\n3. [The Online POV-Ray Tutorial: Creating Simple Scenes][T3]\n4. [The Online POV-Ray Tutorial: Advanced POV-Ray Features][T4]\n5. [4 tips to improve a simple POV-Ray scene][T5]\n6. [Slope map tutorial][T6]\n7. [How to Render Planets][T7]\n\n[T1]: http://library.thinkquest.org/3285/tutorial/intro.html\n[T2]: http://library.thinkquest.org/3285/tutorial/basics.html\n[T3]: http://library.thinkquest.org/3285/tutorial/simple.html\n[T4]: http://library.thinkquest.org/3285/tutorial/advanced.html\n[T5]: http://warp.povusers.org/povtips/\n[T6]: http://warp.povusers.org/SlopeMapTutorial/\n[T7]: http://www.midnightkite.com/index.aspx?URL=PlanetRendering\n\n\nConclusion\n----------\nSome prior knowledge of coordinate geometry was helpful in describing\nsome of the scenes. I found the POV-Ray scene description language\npretty simple and easy to learn. In these 25 days, I managed to learn a\nnumber of useful features and concepts from online tutorials, articles,\navailable source code of POV-Ray scenes described by other POV-Ray\nusers, and managed to describe and render many simple scenes. However,\nthere were a lot of options, features, language directives, effects,\netc. that I could not find time for in these 25 days. These things can\nbe learnt in future by studying the official [POV-Ray documentation][DOC].\n\n[DOC]: http://www.povray.org/documentation/\n\n\nLicense\n-------\nThis is free and open source software. You can use, copy, modify,\nmerge, publish, distribute, sublicense, and/or sell copies of it,\nunder the terms of the MIT License. See [LICENSE.md][L] for details.\n\nThis software is provided \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nexpress or implied. See [LICENSE.md][L] for details.\n\n[L]: LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusam%2Fpov25","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsusam%2Fpov25","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsusam%2Fpov25/lists"}