In python you can define functions in another ".py" file (here it was utilities.py) and can use the defined functions in any other python file by importing the functions using the format "from [filename] import [function]". If you want to import all the functions at once, you can import all the functions with a single line of code using "*" instead of specifying the name of just one function name. e.g. from [filename] import * In the video he uses "from utilities import *". Where "utilities" is the file name and "*" tells python to import all functions. Near the end of the video 9:01 he even opens the file "utilites.py" where he has defined some functions beforehand.
A beginners question. I have copied the code from your video but the 'utilities' library does not exist when I search on PyPl. Can you tell me where I can find it please? I have done a general search for the library but as you may expect there are lots of libraries called "utilities" out there. Thanks
I am sorry for the late reply, you might have already found the answer, but for posterity: the utilities library is a library I created to store the functions of the code, you can do that too by creating a .py file and saving your functions there. The .py file must be in the directory of the main script.
Thank you very much! I am a graduate in the hypersonics field, mainly numerical and analytical. My work is only tangentially related to computer graphics. Sadly I cannot share my work.
Great video, thank you for sharing. Congratulations from Mexico.
Hi, thank you for this resource, could you please share how the "cone" function is written ?
thank you for tutorial video. can i get code file and stl file of tutorial video?
thank you so much for making this video. helped me soooooo much.
Helped me so much! Thank you.
Yes !!! Thank you. Salutations from France.
:D
from utilities import *
which module is that, please?
tried
pip install utilities-package without any luck.
In python you can define functions in another ".py" file (here it was utilities.py) and can use the defined functions in any other python file by importing the functions using the format "from [filename] import [function]".
If you want to import all the functions at once, you can import all the functions with a single line of code using "*" instead of specifying the name of just one function name. e.g. from [filename] import *
In the video he uses "from utilities import *". Where "utilities" is the file name and "*" tells python to import all functions. Near the end of the video 9:01 he even opens the file "utilites.py" where he has defined some functions beforehand.
thank you@@waqqiali2960 !!!
A beginners question. I have copied the code from your video but the 'utilities' library does not exist when I search on PyPl. Can you tell me where I can find it please? I have done a general search for the library but as you may expect there are lots of libraries called "utilities" out there. Thanks
I am sorry for the late reply, you might have already found the answer, but for posterity:
the utilities library is a library I created to store the functions of the code, you can do that too by creating a .py file and saving your functions there. The .py file must be in the directory of the main script.
Code starts at 2:29
**CORRECTIONS**
6:38 - LINE 26 magnitude = ( ... ) ** 0.5
Amazing.
Very Informative Video, I'm also working on similar area. Are you a PhD scholar or researcher, if yes would like to read you work.
Thank you very much! I am a graduate in the hypersonics field, mainly numerical and analytical. My work is only tangentially related to computer graphics. Sadly I cannot share my work.