New Exercise Proposal: Prism

PR has been merged. The exercise is currently live on CoffeeScript.

5 Likes

Thank you all, as always.

I will check the implementations in the various tracks from time to time.
Be careful, I’m watching you! :joy:

3 Likes
1 Like
2 Likes
1 Like

I’m wondering if a visual aid like below might help visualize the path from the instructions.

     Y
  10 |        [#1]---------------→[#3]↗
   5 │         ↑        
   0 │-------→[#2]      [#4]
  -5 │
 -10 └─────────────────────────────────── X
     0    5    10   15   20   25   30   35
1 Like

I notice the exercise blurb is

“Calculate the path of a laser through reflective prisms.”

Should it be

“Calculate the path of a laser through refractive prisms.”

?

1 Like

Yes. It ought to be refractive.

I think you reflect the light back to you, but you refract the light towards something else. So yeah, refractive prism makes more sense. The OP mentioned angles of refraction as well.

Are there any more upvotes for the visual aid suggestion ?

If I’m doing a PR I would like to do both.

2 Likes

Yeah, go ahead and do both. Feel free to do whatever makes sense for the visual aid though. That graph was just a first draft.

+1 from me.

I got AI to draw me a picture

However, where should it be stored so it can be shared amongst tracks?

Can we release AI content under our MIT license?

We use SVG images in other exercises. See this comment for details.

Google Gemini tells me this:


The question of licensing for AI-generated images is a bit unique compared to traditional stock photos or art. Here is how it breaks down for the images and graphs I created for you:

1. Ownership and Use

According to Google’s Terms of Service, Google does not claim ownership of the content you generate with Gemini.

  • You own the output: You are free to use, share, or publish the images I’ve generated for you.
  • No License Fees: There are no royalties or licensing fees required to use these images.

2. Copyright Status

While you own the output, the legal status of AI-generated content is currently in a “public domain” like state in many jurisdictions (including the US):

  • No Human Authorship: The US Copyright Office has consistently ruled that images generated solely by AI without significant human “expressive control” cannot be copyrighted.
  • What this means for you: While you can use the image however you like, you may not be able to stop others from using it if they find it, because it lacks the legal protection of a standard copyright.

3. The Matplotlib Graph

The specific graph I generated using the code tool (Matplotlib) is slightly different. Since it was created using a standard programming library to plot precise coordinates:

  • It is essentially a technical diagram.
  • Mathematical plots and data visualizations are generally considered “functional” or “factual” and typically do not qualify for copyright protection anyway, regardless of whether a human or an AI wrote the code to generate them.

4. Restrictions

The only real “license” restriction is that you must follow Google’s Prohibited Use Policy. This mainly means you can’t use the images to:

  • Generate “deepfakes” or misleading content.
  • Infringe on existing trademarks (like using a famous logo in the grid).
  • Violate safety or harassment policies.

In short: You are free to use the graph for your project without paying anyone or asking for further permission.

AI isn’t legal counsel :slight_smile:

Does this mean it conflicts with the repo license?

It might be best to avoid AI generated content to avoid licensing complications.

Another thing to watch out for is that the graphic will need to either have a light version and dark version, or be invertible. Otherwise, it won’t display correctly for folx using dark (or light) theme.

Can I do that with python matplotlib?

Yes, in the sense that you can apply a dark vs light colorway before saving out two files. I would have to look up if you can actually export an invertible SVG. Hold, plz. :smile: