// Title: Double Slit Interference Pattern
// Create a canvas element with a width and height of 512
// Create a 2D context variable named ctx
// Draw the double slit interference pattern
function drawInterferencePattern(d) {
// Clear the canvas
ctx.clearRect(0, 0, 512, 512);
// Set the colors for the interference pattern
const maxIntensity = 255;
const colors = ['#000000']; // Black color for the least intensity
for (let i = 1; i <= maxIntensity; i++) {
}
// Constants for the pattern
const slitDistance = d / 1000; // Convert mm to meters
const wavelength = 0.0000007; // Wavelength of light in meters (700nm)
const screenDistance = 1; // Distance from slits to screen in meters
const slitWidth = 0.0001; // Width of each slit in meters
// Calculate interference pattern
for (let x = 0; x < 512; x++) {
const theta = (x - 512 / 2) * (wavelength / 512);
const beta = (Math.PI * slitWidth * Math.sin(theta)) / wavelength;
const intensity = Math.cos(Math.PI * slitDistance * Math.sin(theta) / wavelength) ** 2 * (Math.sin(beta) / beta) ** 2;
// Map the intensity to colors
const colorIndex = Math.floor(intensity * maxIntensity);
ctx.fillStyle = colors[colorIndex];
// Draw the line at this point
ctx.fillRect(x, 0, 1, 512);
}
}
// Draw the pattern with initial distance
// Explain what happens when we increase the distance between slits
// As the distance 'd' between the slits increases, the fringes (bright and dark bands) on the screen get closer together.
// If the user prompt continued, it might ask about the effects of changing wavelengths or other parameters.
// And now, for a light-hearted finish...
These are recent AI images made by the community! These may use any AI model including DALL-E 3, Flux, Stable Diffusion, GPT-4, o1, and more and may be anything from simple animated SVGs to PNGs.
DrawGPT is a an AI art generator that uses GPT-4, o1, o3, DALL-E 3, Gemini 2.0, Imagegen 3.0, Flux, Stable Diffusion, and Custom GPTs, ChatGPT, and other large language models to generate new images from text prompts.
This does not require access to premium AI model subscriptions, it is able to be used by anyone with an internet connection and tokens. This allows everyone to get access to the very best AI art generation technology.
Artificial intelligence may create strange or unusual images. It is being used to generated images for advertising, entertainment, gaming, marketing, and fun right now!
Because Draw GPT has access to do many models we assume the model providers have followed best practices when attributing or utilizing data and images in the training data.
Yes! You can use the images for commercial purposes! And so can Draw GPT.
DrawGPT can draw anything you can think of and more! Just type your text prompt in to the textbox exactly like ChatGPT and see what the AI gives you! Seriously, you can get GPT to draw just about anything for you that you can type in the box.
DrawGPT creates images in PNG, SVG, and Javascript format for download and use. This is different than other AI art projects that only create images in PNG format; being able to get a scene graph via Javascript draw commands is a unique feature of this project and getting any AI art in SVG vector format is unique to DrawGPT.
Many people use this to generate quick art for simple projects, video game assets, new business logos, and more. It is also used to generate images for advertising, entertainment, gaming, marketing, creating art for ads and blog posts with AI and fun.
Want to learn more about DrawGPT, the types of possible image renders, and how to use DrawGPT in your next project as a developer?
Check out our AI image generation API!
DrawGPT is runs on an AI that has never actually "seen" an image as embodied AI in its life!
This method of drawing images using raw code is not a great way to draw complex images with lots of structure. It may be able to make photograph quality artwork and professional illustrations with AI but it can fail when using certain types of typography.
Yes and no. Same same but different.
ChatGPT runs on the same model that this project uses, so this is like using ChatGPT to generate images, but it is a different instance of the model. This means that the AI is not precisly the same but it is the same quality AI, image generation AI, large language model, and overall AI art that ChatGPT is using and that Chat GPT can draw.
What is the difference? ChatGPT is specifically wired up to be conversational and track a conversation thread across multiple user prompts. Images in ChatGPT using DALL-E 3 are not saved to the Intenet and made available publicly.
In comparison DrawGPT does not remember things from prompt to prompt, each image is a unique image that does not reference any of the images or prompts previously supplied.
You can do what you want it's your party.
We humbly ask that you backlink to DrawGPT if you do use our images in any promotion or commercial ways, but it is not required.
At the moment all images & Javascript code generated by this tool under the CC0 License with outrageous added term that the license can be revoked or retroactively changed at any time without warning for any image.
Yes! You can use the images for commercial purposes! And so can DrawGPT.
Images & prompts may be made made public.
Depending on the situation the prompts themselves are stored internally for research purposes.
Employees at OpenAI and DrawGPT have access to any prompts you submit.
DO NOT SUBMIT PERSONAL INFORMATION.