|
|
Le 16-01-07 17:22, Mike Horvath a écrit :
> On 1/6/2016 3:46 PM, Alain wrote:
>> It can be done as an isosurface. In fact, there are two builtin
>> functions that does just that.
>>
>> In function.inc, those are: f_helix1() and f_helix2()
>>
>> The various parameters controll the shape of the spiral, it's spacing
>> and some other aspects. Those are some of the functions using the
>> largest number of parameters.
>> The extent of the shapes generated are dependent on the contained_by
>> object. Use a box just whide enough to contain the spiral and as long as
>> needed.
>> Take some time to experiment.
>>
>> If you want to use that shape in an animation similar to the linked one,
>> you need to adjust the length of the box at the same time that you
>> adjust the pitch of the helix.
>>
>> If the amplitude of the sooilationsis relatively small, and the spring
>> far/small enough, it may be possible to use some scalling, but the
>> profile of the "whire" will also change.
>>
>>
>>
>>
>> Alain
>
>
> How would I create a density function to fill the shape with gas?
>
>
> Mike
You could use the same function to controll the media's density. It's
just that, for the isosurface, the value need to be low inside and
higher outside, while, for the media, you probably want it to be at is't
maximum in the center and drop to zero at the surface.
My take would be to use a threshold of zero and negate the function.
In this case, the function evaluate to a negative value inside the
isosurface and positive outside.
If the threshold is larger, you substract the threshold value, then
negate the function.
Next, you can multiply the function by whatever value you want,
or
use a colour_map with values as large as you want them to controll the
pattern of your media.
Alain
Post a reply to this message
|
|