Shell Script – Make Function Execute Recursively
In the following example, we will create a function to compute number’s factorial result.Let’s echo in the function to support fetch return value outside. Output:
In the following example, we will create a function to compute number’s factorial result.Let’s echo in the function to support fetch return value outside. Output:
If you have a few zip files in a folder, and the zip file had compressed some child zips, the following shell script can help you to extract them. The compressed information in our example look like: Shell script: #! /usr/bin/bash # find zips in current path files=() find . Read more…
Rename Files’ Suffixes Recursively And Find Folders Find Folders To find all folders in the current path, I wrote a simple shell script file. It ignores invisible folder which path looks like ./.XXX. #! /usr/bin/bash dirs=() find . -type d -print0 >tmpfile while IFS= read -r -d $’\0′; do dirs+=(“$REPLY”) Read more…
The post shows how to use VTK to display 3D model with shading.We need to make sure the version of VTK is equal to 9 or bigger than it.To avoid the faceted appearance, compute points’ normal to support to has shading at triangle vertices. Demo: Output: The faceted surface of Read more…
The post is related to The Example About vtkPolyDataNormals. If you want to use vtkPolyDataNormals to compute the normals of points, it’s better to set variable Splitting false. #include <vtkVersion.h> #include <vtkSmartPointer.h> #include <vtkSurfaceReconstructionFilter.h> #include <vtkProgrammableSource.h> #include <vtkContourFilter.h> #include <vtkReverseSense.h> #include <vtkPolyDataMapper.h> #include <vtkProperty.h> #include <vtkPolyData.h> #include <vtkCamera.h> #include <vtkRenderer.h> Read more…
The post collects all tools about video on the website, we will display the tool as the embedded content as we can.
The post collects all mathematical tools on the website, we will display the tool as the embedded content as we can.
The post collects all information transfer tools on the website, we will display the tool as the embedded content as we can.
The post collects all file tools on the website, we will display the tool as the embedded content as we can.