Processing Tutorial 3 - Using Methods

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,405
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 23, 2011

CODE FROM THIS TUTORIAL: http://www.jaboston.com/tutorials/Tutorial_3

This tutorial covers using methods in processing and the advantages.

a subroutine (also called procedure, function, routine, method, or subprogram) is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code.

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (thejaboston)

  • Why do you call regular Function a "method" ? It is very confusing and wrong, as methods are used with classes with "::".

    Function !=method

  • @shebotnov Yes I apologise. Some people refer to functions as a method which returns a value as opposed to procedural method which does not return any value.

    However I use function and method as the same word and I am grouping functions and methods together... But I do understand the confusion of relation if you take a function as a method which outputs or takes a value (or returns a value).

    I should have possibly clarified this. Hope that helps.

  • @thejaboston I will also add; many programmers refer to methods and functions in the same way. It should not need confuse anyone when understanding this. This is not for me to prove you wrong or anything, this is just so you know in future when someone explains the same thing. again I hope this helped :).

  • when I put in:  println("x Position is: " + moveX + "Y Postition is: " + moveY); it comes up with an error saying: It looks like your mixing "active" and "static" modes. What does this mean? Please help!!

  • @ElectrolyteIsMe that is odd. You shouldn't be getting that error with the syntax you have wrote there. Have you carefully checked that you put in the syntax correctly?

  • I have the latest version of P and have had errors with some of your code. Ps site says they have abandoned some of their functions including the 3D feature. That really bites because i planned on using my arduino UNO and P to make 3D tetris and other 8 bit games... oh well...

  • @ledguy315 You use OPENGL instead of P3D when you define the variables in the size function. so size(200, 200, OPENGL); would construct a 200 by 200 canvas and use OPENGL to render all your shapes and objects giving you access to all the 3D functions and the z plane! :). Hope that helped. sorry for the really late reply!.

see all

All Comments (21)

Sign In or Sign Up now to post a comment!
  • @thejaboston I will give it a try. Thanks.

  • @thejaboston wait wait. "Some people refer to functions as a method which returns a value as opposed to procedural method which does not return any value."

    Sorry ,but its also wrong =) A "void" or "int, float" etc function is also a function in C/C++ and other languages. A method is a function in a class, like I wrote before. Wiki: "A method is a subroutine (or procedure or function) associated with a class"

    Dont take me for a smart ass, I just want to clear this out =)

  • @thejaboston all of the processing functions are actually methods of some class in processing. Its like in c++ you write cout("text here") but in reality you use cout as a method of std class, so it would be std::cout("text here").

    But user defined functions are just functions. If you would define a class and add functions there - it would be a method.

    Thanks for the tutorials anyway. I was just confused at first you calling it a method.

  • thanks for the vid though

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more