faxingberlin Posted November 16, 2017 Share Posted November 16, 2017 (edited) Hello, I try to make this model to show chemical structure. http://www.pnas.org/content/110/1/34/F4.large.jpg I am a beginner.. Is there good way to make this through procedural method? I try to this. and attach file. Hard to make like the picture. topographically.hip Edited November 16, 2017 by faxingberlin Quote Link to comment Share on other sites More sharing options...

djiki Posted November 19, 2017 Share Posted November 19, 2017 Images you attached are probably generated by some mathematical software like Wolfram Mathematica or MatLab. So if you have exact math function for generating those you can use them in Houdini too. For such Math approach (not really procedural in manner of combining full potential of Houdini), you can use ISO Surface node. Basically that node will accept any function of X,Y,Z coordinate in implicit form. For example if you want to define surface of sphere with radius 1. You actually thinking of function which will give you all points which are at exact 1 unit from let say center of scene. Function which cover that in 3D space would be sqrt(x^2+y^2+z^2)=1 If x,y,z represent coordinate of point then any point with such x,y,z that satisfy equation will be at surface of that one unit sphere. Making power of 2 on both sides of equation of unit radius sphere gives you x^2+y^2+z^2 = 1 That is explicit form of function. If you transfer right part to left: x^2+y^2+z^2- 1 = 0 Now when right part is 0 it could be removed (but think on it as if it exists and is equal to zero) and it leaves you with implicit form of equation x^2+y^2+z^2-1 and that example is default expression value in ISO Surface node. Unit length sphere. That node samples 3D space in ranges you set and for any point in that range generate surface (iso surface) if point's coordinates ($X,$Y,$Z) satisfy implicit equation you entered. Equation of simple torus in implicit form would be (R - sqrt(X^2 + Z^2))^2 + Y^2 - r^2 where R and r are large and small radius of torus ISO_torus.hip Without proper formulas for exact definition of your surfaces everything else is just guessing. If that is good enough you can try modify equation. Btw. any kind of function can be processed even something like noise($X,$Y,$Z) Doing proper math for repetition of many radius levels involve some of repetition functions like Modulus or trigonometry sin or cos. Rearranging arguments for solving for small r gives r = sqrt((R - sqrt(X^2 + Z^2))^2 + Y^2) replacing that instead of r in original function gives you 0 because any point doesn't matter of its coordinate satisfy equation, but if you expand that expression like this r = int(N * sqrt((R - sqrt(X^2 + Z^2))^2 + Y^2)) / N you actually quantize only those points which match quantized radius satisfy equation. ISO_torus_repetition.hip As you can see in example you can also use logical function to clamp calculation in some segment. Expression length($X,0,$Z)<R clamp calculation only inside tube of radius R. That example gives your image 1 On image 2 and 3 you can see that changing over Y axis bends toruses. so you have to put that in equation etc. This is NOT procedural approach, it is just pure math of surface representation for some equation and since you have images from Math software I suppose you also have exact function so you can use it on the same way in Houdini. 5 Quote Link to comment Share on other sites More sharing options...

faxingberlin Posted January 15, 2019 Author Share Posted January 15, 2019 On 2017. 11. 19. at 11:44 PM, djiki said: Images you attached are probably generated by some mathematical software like Wolfram Mathematica or MatLab. So if you have exact math function for generating those you can use them in Houdini too. For such Math approach (not really procedural in manner of combining full potential of Houdini), you can use ISO Surface node. Basically that node will accept any function of X,Y,Z coordinate in implicit form. For example if you want to define surface of sphere with radius 1. You actually thinking of function which will give you all points which are at exact 1 unit from let say center of scene. Function which cover that in 3D space would be sqrt(x^2+y^2+z^2)=1 If x,y,z represent coordinate of point then any point with such x,y,z that satisfy equation will be at surface of that one unit sphere. Making power of 2 on both sides of equation of unit radius sphere gives you x^2+y^2+z^2 = 1 That is explicit form of function. If you transfer right part to left: x^2+y^2+z^2- 1 = 0 Now when right part is 0 it could be removed (but think on it as if it exists and is equal to zero) and it leaves you with implicit form of equation x^2+y^2+z^2-1 and that example is default expression value in ISO Surface node. Unit length sphere. That node samples 3D space in ranges you set and for any point in that range generate surface (iso surface) if point's coordinates ($X,$Y,$Z) satisfy implicit equation you entered. Equation of simple torus in implicit form would be (R - sqrt(X^2 + Z^2))^2 + Y^2 - r^2 where R and r are large and small radius of torus ISO_torus.hip Without proper formulas for exact definition of your surfaces everything else is just guessing. If that is good enough you can try modify equation. Btw. any kind of function can be processed even something like noise($X,$Y,$Z) Doing proper math for repetition of many radius levels involve some of repetition functions like Modulus or trigonometry sin or cos. Rearranging arguments for solving for small r gives r = sqrt((R - sqrt(X^2 + Z^2))^2 + Y^2) replacing that instead of r in original function gives you 0 because any point doesn't matter of its coordinate satisfy equation, but if you expand that expression like this r = int(N * sqrt((R - sqrt(X^2 + Z^2))^2 + Y^2)) / N you actually quantize only those points which match quantized radius satisfy equation. ISO_torus_repetition.hip As you can see in example you can also use logical function to clamp calculation in some segment. Expression length($X,0,$Z)<R clamp calculation only inside tube of radius R. That example gives your image 1 On image 2 and 3 you can see that changing over Y axis bends toruses. so you have to put that in equation etc. This is NOT procedural approach, it is just pure math of surface representation for some equation and since you have images from Math software I suppose you also have exact function so you can use it on the same way in Houdini. Wow Really Thank u! Quote Link to comment Share on other sites More sharing options...

## Recommended Posts

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Note:Your post will require moderator approval before it will be visible.