<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: CDEV</title>
    <description>The latest articles on DEV Community by CDEV (@cdev12).</description>
    <link>https://dev.to/cdev12</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3946347%2F0526653f-38ec-4aa1-9a05-a69c938b670b.png</url>
      <title>DEV Community: CDEV</title>
      <link>https://dev.to/cdev12</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cdev12"/>
    <language>en</language>
    <item>
      <title>I built an open-source diamond size visualizer (to-scale, faceted SVG)</title>
      <dc:creator>CDEV</dc:creator>
      <pubDate>Fri, 22 May 2026 19:40:16 +0000</pubDate>
      <link>https://dev.to/cdev12/i-built-an-open-source-diamond-size-visualizer-to-scale-faceted-svg-1d4i</link>
      <guid>https://dev.to/cdev12/i-built-an-open-source-diamond-size-visualizer-to-scale-faceted-svg-1d4i</guid>
      <description>&lt;p&gt;Ever wondered how big a "1 carat diamond" actually is? It's pure geometry&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;so I built a free, open-source tool that draws any diamond to true
scale.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Live demo: &lt;a href="https://diamondguide.co.za/diamond-size-calculator" rel="noopener noreferrer"&gt;https://diamondguide.co.za/diamond-size-calculator&lt;/a&gt;&lt;br&gt;
  Repo (MIT): &lt;a href="https://github.com/etchad2-hub/diamond-size-calculator" rel="noopener noreferrer"&gt;https://github.com/etchad2-hub/diamond-size-calculator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The problem&lt;/p&gt;

&lt;p&gt;Carat is a measure of weight, not size. So "1 carat" tells a shopper&lt;br&gt;
  nothing about what the stone actually looks like on a hand. I wanted a&lt;br&gt;
  tool that renders the real millimetre size, for any shape, at actual scale&lt;br&gt;
   on screen.&lt;/p&gt;

&lt;p&gt;The fun part: size is a cube root&lt;/p&gt;

&lt;p&gt;A diamond is 3D, so its weight scales with volume — meaning the linear&lt;br&gt;
  size scales with the cube root of carat weight:&lt;/p&gt;

&lt;p&gt;const dimAt = (base1ct, carat) =&amp;gt; base1ct * Math.cbrt(carat);&lt;br&gt;
  // round brilliant: 6.5mm at 1ct -&amp;gt; 8.2mm at 2ct (only ~26% wider!)&lt;/p&gt;

&lt;p&gt;That's why doubling the carats barely widens the stone but massively&lt;br&gt;
  raises the price.&lt;/p&gt;

&lt;p&gt;Faceting with SVG&lt;/p&gt;

&lt;p&gt;Each gem is a little facet-tessellation engine: sample the girdle outline&lt;br&gt;
  into points, scale it into concentric rings (girdle → mid → table).&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>react</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
