Please can someone help me create a floor plan!!! this is an elective course im no longer going to take it later on, however i have this final assignment due I need to create a 2D floor plan from processing please please can someone help, anything is ok like either simple or anything, as long as a few walls and room then it’ll be fine pls help!!!
Decide on the image size for the displayed 2D plan e.g. 600x400
Get some graph paper and draw a rectangle to represent the whole-floor-area. Make sure there is a simple correlation between graph paper grid size and screen pixels.
Now inside this rectangle draw lines, boxes and circles to represent rooms, furniture etc.
On the graph paper write down the coordinates (pixel equivalent) for corners line ends etc.
Start the Processing IDE and using basic methods such as line(...), rect(...), fill(...), stroke(…)` etc to reproduce the drawing
No one here is going to give you a fully coded example because it is an assignment. The assignment is designed for you to prove what YOU have learnt on the course.
Everyone has to start somewhere and if you have managed to edit some examples from youtube then you should know enough about Processing to create a simple sketch to draw a rectangle or a line. If you can manage that then you should follow the instructions I posted earlier and have a go.
OK the following code will get you started. Once you have it working simply follow the instructions I have given in my previous posts and you will have a floor plan.
If you get stuck then look in the reference documents for methods that might help you or explanations for the methods used here e.g. fill(...), rect(...) etc. If after looking at the reference you don’t understand something then ask here.
I think it’s about time YOU did some work and created some code
// Declare any variables here for example we can use these to
// represent the floor plan size
float planW, planH;
// This function is executed once and is used to initialise any
// variables needed by the sketch.
void setup() {
size(600, 400);
planW = 580;
planH = 380;
}
// After setup has been executed This method is used to draw a single
//frame. Processing repeats this method 60 times a second.
void draw() {
background(255); // clear the display with a white background
// Draw floor plan edge
fill(255, 255, 240);
stroke(0);
strokeWeight(3); // default is 1
rect(0, 0, planW, planH);
// From here you can use the drawing commands to draw the rest
// of the floor plan
// ...
}
yea!! exactly the point… i guess im not really understanding it… but i figured how to draw a simple floor plan with my friend… thankyou for the help… I’ll keep in mind of that next time
Hey, quark!
Thank you very much for your code.
I am teaching myself Python and just got the book, ‘Learn Python Visually - Creative Coding With Processing.py’. As a way to practice, I decided to create an American flag. I had the blue square and red and white stripes done. I figured how to create a star in a senate file and to scale to any size I want using a function. My problem was how to reproduce and place the stars correctly, and your code gave me some ideas on how to do it. When I finish I will place the code. I am sure this is very basic, but it is a good way for practicing/learning.