CODE

<Window x:Class=”WpfApplication1.MainWindow”
       xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation
       xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml
       x:Name=”Window”
       Title=”Path Opacity Mask Animation Demo”
       Width=”640″ Height=”480″ xmlns:System=”clr-namespace:System;assembly=mscorlib”>

       <Window.Resources>
              <Storyboard x:Key=”Timeline1″>
                     <DoubleAnimationUsingKeyFrames BeginTime=”00:00:00″ Storyboard.TargetName=”path1″      Storyboard.TargetProperty=”(Shape.StrokeDashOffset)”>
                           <SplineDoubleKeyFrame KeyTime=”00:00:01″ Value=”25″/>
                           <SplineDoubleKeyFrame KeyTime=”00:00:02″ Value=”0″/>
                     </DoubleAnimationUsingKeyFrames>
                     <DoubleAnimationUsingKeyFrames BeginTime=”00:00:00″ Storyboard.TargetName=”path2″  Storyboard.TargetProperty=”(Shape.StrokeDashOffset)”>
                           <SplineDoubleKeyFrame KeyTime=”00:00:03″ Value=”25″/>
                           <SplineDoubleKeyFrame KeyTime=”00:00:04″ Value=”0″/>
                     </DoubleAnimationUsingKeyFrames>
    </Storyboard>
       </Window.Resources>
       <Window.Triggers>
              <EventTrigger RoutedEvent=”FrameworkElement.Loaded”>
                     <BeginStoryboard Storyboard=”{StaticResource Timeline1}”/>
              </EventTrigger>
       </Window.Triggers>

       <Grid x:Name=”LayoutRoot”>
              <Image Source=”Hydrangeas.jpg” Stretch=”Fill”>
      <Image.OpacityMask>
    <VisualBrush>
             <VisualBrush.Visual>
               <Path x:Name=”path1″ Stretch=”Fill” Stroke=”#FF000000″ StrokeDashOffset=”1000″ StrokeEndLineCap=”Round” StrokeStartLineCap=”Round” StrokeThickness=”20″ HorizontalAlignment=”Left” Margin=”228,145.336,0,188.972″ Width=”71″ Data=”M294,171 C289,162 283,147 268,151 253,155 244,164.99992 244,177.00008 244,189.00024 284,196.00033 287,207.00047 290,218.00062 286,249.00103 259,250.00104 232,251.00105 235,225.00071 233,219.00063″ StrokeDashArray=”25 1000″/>
             </VisualBrush.Visual>
           </VisualBrush>
    </Image.OpacityMask>
     </Image>
    
    <Path x:Name=”path2″ Stretch=”Fill” Stroke=”#FF000000″ StrokeDashOffset=”1000″ StrokeEndLineCap=”Round” StrokeStartLineCap=”Round” StrokeThickness=”20″ HorizontalAlignment=”Left” Margin=”228,145.336,0,188.972″ Width=”71″ Data=”M294,171 C289,162 283,147 268,151 253,155 244,164.99992 244,177.00008 244,189.00024 284,196.00033 287,207.00047 290,218.00062 286,249.00103 259,250.00104 232,251.00105 235,225.00071 233,219.00063″ StrokeDashArray=”25 1000″/>
          
  </Grid>
</Window>

When design power electronics, to prevent devices from overheating and damage, heatsinks are commonly used. How to calculate heatsinks is thus an issue.

The basic theory is a thermal equivalent of Ohm’s Law. For a power transistor:

T(j-a) = Pd x Rth(j-a)

T(j-a) (in degrees Celsius) is the temperature rise of the transistor above ‘ambient ’ temperature.

Pd (in watts)is the power disspipated.

Rth(j-a) (in degress Celsius per watt)is the total thermal resistance between the junction and the ambient.

A design example: