Root { inputs 0 format "2048 1556 0 0 2048 1556 1 2K_Super_35(full-ap)" proxy_type scale proxy_format "1024 778 0 0 1024 778 1 1K_Super_35(full-ap)" } StickyNote { inputs 0 name StickyNote10 label "CurtainKernel:\nA rippling curtain effect with \n1D ranged access" xpos -174 ypos -117 } CheckerBoard2 { inputs 0 name CheckerBoard3 xpos -133 ypos -65 } BlinkScript { KernelDescription "1 \"CurtainKernel\" iterate componentWise 5bf7fa35ef6e91b8cb3dbf7f8493d620cc80d977819b69e1e30605e2348da970 2 \"src\" Read Ranged1D \"dst\" Write Point 3 \"amplitude\" Float 1 AADIQg== \"phase\" Float 1 2w9JQA== \"period\" Float 1 AAD6Qw==" kernelSource "//Note if line numbers change writing_a_process.rst must be edited.\nkernel CurtainKernel : ImageComputationKernel<eComponentWise>\n\{\n Image<eRead, eAccessRanged1D, eEdgeConstant> src;\n Image<eWrite, eAccessPoint> dst;\n\nparam:\n float amplitudePixels;\n float phaseRadians;\n float periodPixels;\n\nlocal:\n float angularFrequency;\n\n void define() \{\n defineParam(amplitudePixels, \"amplitude\", 100.0f);\n defineParam(phaseRadians, \"phase\", PI);\n defineParam(periodPixels, \"period\", 500.0f);\n \}\n\n void init() \{\n src.setRange(-amplitudePixels, amplitudePixels);\n src.setAxis(eX);\n angularFrequency = 2.0f*PI/periodPixels;\n \}\n\n void process(int3 pos) \{\n int offset = amplitudePixels * sin( pos.y * angularFrequency + phaseRadians );\n dst() = src(offset);\n \}\n\};\n\n" rebuild "" name BlinkScript3 selected true xpos -133 ypos 7 } Viewer { frame 1 input_process false name Viewer1 xpos -133 ypos 67 }
Search Tips
Search is based on keyword.
Ex: "Procedures"
Do not search with natural language
Ex: "How do I write a new procedure?"
Sorry you didn't find this helpful
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
If you can't find what you're looking for or you have a workflow question, please try Foundry Support.
If you have any thoughts on how we can improve our learning content, please email the Documentation team using the button below.
Thanks for taking time to give us feedback.