Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Could you help me fix this code, the waves are not visible and the animation is not generated :C
Post Body

// Par谩metros de la escena

#declare Radio = 5; // Radio de la membrana

#declare Frecuencia1 = 2; // Frecuencia de la primera onda

#declare Frecuencia2 = 12; // Frecuencia de la segunda onda

#declare Amplitud = 0.2; // Amplitud de las ondas

#declare Tiempo = 100; // Duraci贸n de la animaci贸n en segundos

#declare FPS = 30; // Cuadros por segundo (ajustado a 30 FPS para una animaci贸n suave)

// Configuraci贸n de la c谩mara

camera {

location <0, 7, 9>

look_at <0, 0, 0>

}

// Iluminaci贸n

light_source {

<0, 20, -30>

color rgb <1, 1, 1>

}

// Membrana circular

sphere {

<0, 0, 0>, Radio

texture {

pigment {

checker color rgb <0, 0, 0>, color rgb <1, 1, 1>

scale 0.2

}

finish {

ambient 0.2

diffuse 0.8

}

}

scale <1, 0.1, 1>

}

// Animaci贸n de interferencia

#declare Frames = Tiempo * FPS;

#declare Frequency1Factor = 2 * pi * Frecuencia1 / FPS;

#declare Frequency2Factor = 2 * pi * Frecuencia2 / FPS;

#declare TimeFactor = 2 * pi / FPS;

#declare Phase1 = 0;

#declare Phase2 = 0;

// Crear una carpeta para almacenar los cuadros de la animaci贸n

#declare OutputFolder = "frames";

// Verificar si la carpeta ya existe o crearla

#local mkdir_result = system(sprintf("mkdir \"%s\"", OutputFolder));

#if (0 == mkdir_result)

// Macro para la animaci贸n

#macro InterferenceAnimation()

#for (Frame, 0, Frames - 1)

#local FrameTime = Frame / FPS;

#local Z1 = Amplitud * sin(Frequency1Factor * FrameTime Phase1);

#local Z2 = Amplitud * sin(Frequency2Factor * FrameTime Phase2);

union {

sphere {<0, 0, Z1>, 0.1 texture {pigment {color rgb <1, 1, 0>}}}

sphere {<0, 0, Z2>, 0.1 texture {pigment {color rgb <1, 0, 1>}}

}

#declare Phase1 = Phase1 TimeFactor;

#declare Phase2 = Phase2 TimeFactor;

#end

#end

// Llamar a la macro para generar la animaci贸n y renderizar cuadros

for (Frame, 0, Frames - 1)

#declare FrameTime = Frame / FPS;

#declare Z1 = Amplitud * sin(Frequency1Factor * FrameTime Phase1);

#declare Z2 = Amplitud * sin(Frequency2Factor * FrameTime Phase2);

union {

sphere {<0, 0, Z1>, 0.1 texture {pigment {color rgb <1, 1, 0>}}

sphere {<0, 0, Z2>, 0.1 texture {pigment {color rgb <1, 0, 1>}}

}

#declare Phase1 = Phase1 TimeFactor;

#declare Phase2 = Phase2 TimeFactor;

// Renderizar y guardar cada cuadro como una imagen PNG

#declare FrameFilename = sprintf("%s/frame_d.png", OutputFolder, Frame);

camera {

location <0, 7, 9>

look_at <0, 0, 0>

}

render resolution 800x600 output_file FrameFilename format png

#end

#else

// Informar sobre el error de creaci贸n de la carpeta

#error "Error al crear la carpeta de salida"

#end

https://preview.redd.it/8q51rs4f5gyb1.png?width=1366&format=png&auto=webp&s=32afc22d73846cfa91edce48e66a3f036585d0a3

Author
Account Strength
40%
Account Age
1 year
Verified Email
Yes
Verified Flair
No
Total Karma
65
Link Karma
51
Comment Karma
14
Profile updated: 5 days ago
Posts updated: 1 week ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago