## MPEG 1/2 file structure

graphics

### Next

• 1. Intersection check in surface meshing
hi there, I am working on surface meshing based on advancing front technique. All the nodes in real space have a corresponding mapping nodes in parametric region. So I could narrow down the problem in 2D. I am using a line segment intersection method to test if two lines are intersect. If both the parameters 0 <= s <= 1 and 0 <= t <= 1, then they are considered overlap. Consider the follwing case: How to determine if C is valid to form a triangle with front A-B by using the line segment intersection test above? C D / / D C A-----B-----C-----D / / A-------B A---------B Case1 Case2 Case 3 case 1: above condition works. s=0 and t=0 bt CA and DA. Therefore C is invalid. case 2,3: s = 0 and t = 0 for CA and CD (wrong outcome) One has suggested to ignore the nodes on the next and prev front. However if this is the case, I may miss to form a good triangle as in Case2. I would appreciate for any advice and help. Thank you. julia
• 2. Dynamic connectors like VISIO
Hello, I am looking for an algorithm for reproducing the behavior of dynamic connectors as you can see in VISIO. I have some ideas using Graph theory and shortest path finding but it is O(N^3) so I am looking for a quite faster method... Any idea? Thanks, Lionel.
• 3. Game Physics
I'm considering buying Dave Eberly's "Game Physics" book. I wanted to know if it contains software design and implementation of the ideas as well. This will be the first time I'll be programming nontrivial physics stuff, and I would like a software design model to sort of follow, so that the physics integrates well with the graphics engine. Also, there is a book "Collision Detection" in the same book series. Anyone read it?
• 4. Schlick reflection model
Hello I read the following equations from my book ("realistic image synthesis using photon mapping") for Schlick reflection model: "The expression for this (random reflected glossy direction for Schlick model) in spherical coordinates around the half-vector H is: " r = roughness i = isotropy e1, e2 = random number [0, 1] t = sqrt(e1*roughness) - e1*roughness + e1 w = cos[(pi / 2) * sqrt((i^2 * e2^2) / (1 + e2^2(i^2 - 1)))] But... t and w do not look like spherical coordinates: w is in range [-1, 1] and t does not make any sense if other of these should be in range [0, pi / 2] and the other in the range [0, 2pi] I picked up the original paper, but this does not say anything about generating random BRDF directions. So, what are these t and w ?

### MPEG 1/2 file structure

```Can anyone point me to some article related to the structure of an
MPEG 1/2 video file ? There are lots of sources with information of
the decompression/compression algorithms, but none provide a clear
view of the structure of the bit stream. I have looked into the
libmpeg2 source code, but it's too hand optimized and thereby unclear.
```

```Can anyone point me to some article related to the structure of an
MPEG 1/2 video file ? There are lots of sources with information of
the decompression/compression algorithms, but none provide a clear
view of the structure of the bit stream. I have looked into the
libmpeg2 source code, but it's too hand optimized and thereby unclear.
```

```I noticed that viewing some of my JPEG files using Notepad
the first character is always chr(255).  Is this valid for
all JPEG files?

I don't have any MPEG files readily available.  What is
the first character and is it consistent for all MPEG
files?

What I'm trying to do is read the first character of
various files to determine what type of file it is without
using the file extension.  What would be a better solution
without too much coding?

TIA....  John
---------------------------
Dim sFile As String
Dim sBuffer As String
Dim ff As Integer
sFile = Dir("*")
Do While sFile <> ""
ff = FreeFile
Open sFile For Binary As #ff
sBuffer = Space\$(1)
Get #ff, 1, sBuffer
If sBuffer = Chr(255) Then MsgBox "JPEG File"
Close #ff
sFile = Dir
Loop
End sub

```

```I have a little program that writes a few characters to
MPEG files to make them unviewable.  More or less like a
simple encrypt/decrypt program.  I run into a "Runtime
Error 75 - Path/File access error" if I have previewed the
file before running the program.  Preview meaning the
little thumb image that appears in Windows Explorer when
you click on a file.  Windows seems to keep the file open
somewhere and I can't write to it.  If I click on another
MPEG file and run the program on the previous file then it
works.  How do I go about closing the opened file?
Thanks...

Thomas
```

```I'm completely new to video editing.  I have 25 GB of MPEG-2 files which I
would like to extract segments from and assemble onto one DVD.

I'm using ULEAD DVD Movie Factory for the first time, and it doesn't seem
able to do what I need.  The help section doesn't have much info on what I'm
trying to do.

I have multi-trimmed an MPEG-2 file and created several clips, but I don't
see how to join the clips into a continuous video.  The join/separate video
icon is greyed out.

Thanks for any help.

George

```