Skip to content

Commit

Permalink
[[]*><*[]]
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaudry committed Jan 12, 2025
1 parent 223264b commit 743987f
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 0 deletions.
Empty file.
Empty file.
96 changes: 96 additions & 0 deletions ift6251/processing/demos/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>art.algo</groupId>
<artifactId>demos</artifactId>
<version>1.0-SNAPSHOT</version>

<name>demos</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>17</maven.compiler.release>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<!-- Optionally: parameterized tests support -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.processing/core -->
<dependency>
<groupId>org.processing</groupId>
<artifactId>core</artifactId>
<version>3.3.6</version>
</dependency>
</dependencies>

<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.6.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
7 changes: 7 additions & 0 deletions ift6251/processing/demos/src/main/java/art/algo/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package art.algo;
public class App {
public static void main(String[] args) {
System.out.println("hello");
}

}
60 changes: 60 additions & 0 deletions ift6251/processing/demos/src/main/java/art/algo/Carresjaunes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
package art.algo;

import processing.core.PApplet;

public class Carresjaunes extends PApplet {
int w = 1000;
int h = 1000;
int st;
float cx;
float cy;
float rad;
float x1;
float x2;
float y1;
float y2;

int hu;
boolean grow;

@Override
public void settings() {
size(w, h);
}

@Override
public void setup() {
st=0;
colorMode(HSB, 360, 100, 100);
cx=(float) (w*0.5);
cy=(float) (h*0.5);
rad=random((float)0.3,(float)0.5)*w;
colorMode(HSB,360,100,100);
background(0,0,0);
}

@Override
public void draw() {
fill(50,100,100);
float x,y;
float offsetx, offsety;
for(int i=0; i< 42;i++){
offsetx=random(-100,100);
offsety=random(-100,100);
x=cx+offsetx;
y=cy+offsety;
pushMatrix();
translate(x,y);
rect(-(float)(w*0.3),-(float)(h*0.3),(float)(w*0.6),(float)(h*0.6));
popMatrix();
}
noLoop();
}


public static void main(String[] args) {
String[] processingArgs = { "Carresjaunes " };
Carresjaunes mySketch = new Carresjaunes();
PApplet.runSketch(processingArgs, mySketch);
}
}
19 changes: 19 additions & 0 deletions ift6251/processing/demos/src/test/java/art/algo/AppTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package art.algo;

import static org.junit.jupiter.api.Assertions.assertTrue;

import org.junit.jupiter.api.Test;

/**
* Unit test for simple App.
*/
public class AppTest {

/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue() {
assertTrue(true);
}
}

0 comments on commit 743987f

Please sign in to comment.